Skip to content

Commit

Permalink
Add TextFormat function and have it return the format only.
Browse files Browse the repository at this point in the history
  • Loading branch information
REDl3east committed Feb 9, 2024
1 parent c5df678 commit f2c49ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions examples/core_input_mouse_wheel.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ void GameFrame()
DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON);

DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY);
// TODO: implement TextFormat
// DrawText(TextFormat("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY);
DrawText(TextFormat("Box position Y: %03i", 111, 222, 333, 444, 555), 10, 40, 20, LIGHTGRAY);

EndDrawing();
}
Expand Down
4 changes: 4 additions & 0 deletions raylib.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ class RaylibJs {
return false;
}

TextFormat(... args){
return args[0];
}

raylib_js_set_entry(entry) {
this.entryFunction = this.wasm.instance.exports.__indirect_function_table.get(entry);
}
Expand Down

0 comments on commit f2c49ea

Please sign in to comment.