mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Moved ctr.gfx.set|getTextSize to ctr.gfx.font.set|getSize, added missing documentation to font:width
Started working again on the editor
This commit is contained in:
parent
b798818e99
commit
347e480d5a
7 changed files with 38 additions and 34 deletions
23
source/gfx.c
23
source/gfx.c
|
|
@ -26,7 +26,6 @@ typedef struct {
|
|||
|
||||
bool isGfxInitialized = false;
|
||||
bool is3DEnabled = false; //TODO: add a function for this in the ctrulib/sf2dlib.
|
||||
u32 textSize = 9;
|
||||
|
||||
/***
|
||||
The `ctr.gfx.color` module.
|
||||
|
|
@ -373,26 +372,6 @@ static int gfx_calcBoundingBox(lua_State *L) {
|
|||
return 2;
|
||||
}
|
||||
|
||||
/***
|
||||
Set the default text size.
|
||||
@function setTextSize
|
||||
@tparam number size new default text size
|
||||
*/
|
||||
static int gfx_setTextSize(lua_State *L) {
|
||||
textSize = luaL_checkinteger(L, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***
|
||||
Return the default text size.
|
||||
@function getTextSize
|
||||
@treturn number the default text size
|
||||
*/
|
||||
static int gfx_getTextSize(lua_State *L) {
|
||||
lua_pushinteger(L, textSize);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/***
|
||||
Enables or disable the scissor test.
|
||||
When the scissor test is enabled, the drawing area will be limited to a specific rectangle, every pixel drawn outside will be discarded.
|
||||
|
|
@ -593,8 +572,6 @@ static const struct luaL_Reg gfx_lib[] = {
|
|||
{ "text", gfx_text },
|
||||
{ "wrappedText", gfx_wrappedText },
|
||||
{ "calcBoundingBox", gfx_calcBoundingBox },
|
||||
{ "setTextSize", gfx_setTextSize },
|
||||
{ "getTextSize", gfx_getTextSize },
|
||||
{ "scissor", gfx_scissor },
|
||||
{ "target", gfx_target },
|
||||
{ "console", gfx_console },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue