fix DrawText func && add enum with text encoding && update manual && other

This commit is contained in:
2025-04-07 21:11:37 +05:00
parent d6b784814f
commit 593c4a6596
7 changed files with 127 additions and 36 deletions

View File

@@ -24,6 +24,13 @@ enum TextScale
TextScale_SIZE_64x128 // 8x 8x16
};
enum DrawTextEncoding
{
cp866 = 1,
utf8 = 3,
utf16 = 4
};
int syscalls_drawLine(lua_State* L);
int syscalls_drawText(lua_State* L);
int syscalls_drawRectangle(lua_State* L);
@@ -85,4 +92,22 @@ inline void syscalls_push_textSizes(lua_State* L)
lua_setfield(L, -2, "textSize");
}
#endif // __GRAPHIC_H__
inline void syscalls_push_Encoding(lua_State* L)
{
lua_newtable(L);
lua_pushinteger(L, cp866);
lua_setfield(L, -2, "cp866");
lua_pushinteger(L, utf8);
lua_setfield(L, -2, "utf8");
lua_pushinteger(L, utf16);
lua_setfield(L, -2, "utf16");
lua_setfield(L, -2, "Encoding");
}
#define syscalls_push_graphic(L) syscalls_push_textSizes(L); syscalls_push_Encoding(L);
#endif // __GRAPHIC_H__