diff options
| author | jussi | 2023-10-31 15:24:11 +0200 |
|---|---|---|
| committer | jussi | 2023-10-31 15:24:11 +0200 |
| commit | be39fd96344ee1f4f85ac5c63b4e5f9daf6e5171 (patch) | |
| tree | f0612052c4fe78ad2b6c2e7e8fc695a18d1d961e /src/lua_core.c | |
| parent | d351b7b025f95983e49afaecb2fafef7802996a0 (diff) | |
| download | reilua-enhanced-be39fd96344ee1f4f85ac5c63b4e5f9daf6e5171.tar.gz reilua-enhanced-be39fd96344ee1f4f85ac5c63b4e5f9daf6e5171.tar.bz2 reilua-enhanced-be39fd96344ee1f4f85ac5c63b4e5f9daf6e5171.zip | |
GlyphInfo type. Some new text and core functions.
Diffstat (limited to 'src/lua_core.c')
| -rw-r--r-- | src/lua_core.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/lua_core.c b/src/lua_core.c index cb91583..90ed9ba 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -1504,6 +1504,8 @@ void luaRegister() { assingGlobalFunction( "SetWindowMonitor", lcoreSetWindowMonitor ); assingGlobalFunction( "SetWindowPosition", lcoreSetWindowPosition ); assingGlobalFunction( "SetWindowSize", lcoreSetWindowSize ); + assingGlobalFunction( "SetWindowOpacity", lcoreSetWindowOpacity ); + assingGlobalFunction( "GetWindowHandle", lcoreGetWindowHandle ); assingGlobalFunction( "SetWindowMinSize", lcoreSetWindowMinSize ); assingGlobalFunction( "GetMonitorPosition", lcoreGetMonitorPosition ); assingGlobalFunction( "GetMonitorSize", lcoreGetMonitorSize ); @@ -1514,6 +1516,7 @@ void luaRegister() { assingGlobalFunction( "ClearWindowState", lcoreClearWindowState ); assingGlobalFunction( "IsWindowResized", lcoreIsWindowResized ); assingGlobalFunction( "SetWindowIcon", lcoreSetWindowIcon ); + assingGlobalFunction( "SetWindowIcons", lcoreSetWindowIcons ); assingGlobalFunction( "SetWindowTitle", lcoreSetWindowTitle ); assingGlobalFunction( "GetMonitorCount", lcoreGetMonitorCount ); assingGlobalFunction( "GetCurrentMonitor", lcoreGetCurrentMonitor ); @@ -1936,9 +1939,15 @@ void luaRegister() { /* Drawing. */ assingGlobalFunction( "DrawFPS", ltextDrawFPS ); assingGlobalFunction( "DrawText", ltextDrawText ); + assingGlobalFunction( "DrawTextEx", ltextDrawTextEx ); assingGlobalFunction( "DrawTextPro", ltextDrawTextPro ); - /* Misc. */ + assingGlobalFunction( "DrawTextCodepoint", ltextDrawTextCodepoint ); + assingGlobalFunction( "DrawTextCodepoints", ltextDrawTextCodepoints ); + /* Font info functions. */ assingGlobalFunction( "MeasureText", ltextMeasureText ); + assingGlobalFunction( "GetGlyphIndex", ltextGetGlyphIndex ); + assingGlobalFunction( "GetGlyphInfo", ltextGetGlyphInfo ); + assingGlobalFunction( "GetGlyphAtlasRec", ltextGetGlyphAtlasRec ); assingGlobalFunction( "GetFontBaseSize", ltextGetFontBaseSize ); assingGlobalFunction( "GetFontGlyphCount", ltextGetFontGlyphCount ); assingGlobalFunction( "GetFontGlyphPadding", ltextGetFontGlyphPadding ); @@ -3129,6 +3138,20 @@ void uluaPushBoundingBox( lua_State *L, BoundingBox box ) { lua_rawseti( L, -2, 2 ); } +void uluaPushGlyphInfo( lua_State *L, GlyphInfo glyphInfo, Image *image ) { + lua_createtable( L, 4, 0 ); + lua_pushinteger( L, glyphInfo.value ); + lua_setfield( L, -2, "value" ); + lua_pushinteger( L, glyphInfo.offsetX ); + lua_setfield( L, -2, "offsetX" ); + lua_pushinteger( L, glyphInfo.offsetY ); + lua_setfield( L, -2, "offsetY" ); + lua_pushinteger( L, glyphInfo.advanceX ); + lua_setfield( L, -2, "advanceX" ); + lua_pushlightuserdata( L, image ); + lua_setfield( L, -2, "image" ); +} + void uluaPushBuffer( lua_State *L, Buffer buffer ) { Buffer *bufferP = lua_newuserdata( L, sizeof( Buffer ) ); *bufferP = buffer; |
