GlyphInfo type. Some new text and core functions.
This commit is contained in:
50
src/core.c
50
src/core.c
@@ -125,6 +125,32 @@ int lcoreSetWindowSize( lua_State *L ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> 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 )
|
||||
|
||||
@@ -265,6 +291,30 @@ int lcoreSetWindowIcon( lua_State *L ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> 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 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user