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/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/core.c')
| -rw-r--r-- | src/core.c | 50 |
1 files changed, 50 insertions, 0 deletions
@@ -126,6 +126,32 @@ int lcoreSetWindowSize( lua_State *L ) { } /* +> RL.SetWindowOpacity( float opacity ) + +Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) +*/ +int lcoreSetWindowOpacity( lua_State *L ) { + float opacity = luaL_checknumber( L, 1 ); + + SetWindowOpacity( opacity ); + + return 0; +} + +/* +> windowHandle = RL.GetWindowHandle() + +Get native window handle. Return as lightuserdata + +- Success return lightuserdata +*/ +int lcoreGetWindowHandle( lua_State *L ) { + lua_pushlightuserdata( L, GetWindowHandle() ); + + return 1; +} + +/* > RL.SetWindowMinSize( Vector2 size ) Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) @@ -266,6 +292,30 @@ int lcoreSetWindowIcon( lua_State *L ) { } /* +> RL.SetWindowIcons( Image{} images ) + +Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP) +*/ +int lcoreSetWindowIcons( lua_State *L ) { + int count = uluaGetTableLenIndex( L, 1 ); + Image images[ count ]; + + int t = 1; + int i = 0; + lua_pushnil( L ); + + while ( lua_next( L, t ) != 0 ) { + images[i] = *uluaGetImage( L, lua_gettop( L ) ); + + i++; + lua_pop( L, 1 ); + } + SetWindowIcons( images, count ); + + return 0; +} + +/* > RL.SetWindowTitle( string title ) Set title for window (Only PLATFORM_DESKTOP) |
