RL_GetWindowSize renamed to RL_GetScreenSize.

This commit is contained in:
jussi
2023-02-15 01:10:03 +02:00
parent cf7c480aca
commit 9df23e32b0
20 changed files with 28 additions and 25 deletions

6
API.md
View File

@@ -617,6 +617,8 @@ BLEND_ADD_COLORS
BLEND_SUBTRACT_COLORS BLEND_SUBTRACT_COLORS
BLEND_ALPHA_PREMULTIPLY
BLEND_CUSTOM BLEND_CUSTOM
## Globals - Gesture ## Globals - Gesture
@@ -1194,9 +1196,9 @@ Get window position on monitor
--- ---
> size = RL_GetWindowPosition() > size = RL_GetScreenSize()
Get window size Get screen size
- Success return Vector2 - Success return Vector2

View File

@@ -15,8 +15,8 @@ KEY CHANGES:
Detailed changes: Detailed changes:
ADDED: Help argument. ADDED: Help argument.
CHANGED: Changed fuction name RL_rlSetLineWidth to RL_rlglSetLineWidth. CHANGED: RL_rlSetLineWidth renamed to RL_rlglSetLineWidth.
CHANGED: Changed fuction name RL_rlGetLineWidth to RL_rlglGetLineWidth. CHANGED: RL_rlGetLineWidth renamed to RL_rlglGetLineWidth.
FIXED: DrawRectangleGradient V and H expecting wrong arguments. FIXED: DrawRectangleGradient V and H expecting wrong arguments.
ADDED: RL_LoadDirectoryFilesEx. ADDED: RL_LoadDirectoryFilesEx.
FIXED: RL_DrawLineBezierQuad was called RL_DrawLineBezier in API. FIXED: RL_DrawLineBezierQuad was called RL_DrawLineBezier in API.
@@ -27,4 +27,5 @@ ADDED: RL_SetMaterialShader.
ADDED: RL_GetFileLength. ADDED: RL_GetFileLength.
ADDED: RL_LoadFontEx. ADDED: RL_LoadFontEx.
FIXED: RL_ImageAlphaClear expecting wrong arguments. FIXED: RL_ImageAlphaClear expecting wrong arguments.
ADDED: BLEND_ALPHA_PREMULTIPLY ADDED: BLEND_ALPHA_PREMULTIPLY.
CHANGED: RL_GetWindowSize renamed to RL_GetScreenSize.

View File

@@ -11,7 +11,7 @@ function init()
local monitor = 0 local monitor = 0
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT ) RL_SetWindowState( FLAG_VSYNC_HINT )

View File

@@ -65,7 +65,7 @@ function init()
local monitor = 0 local monitor = 0
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
winSize = RL_GetWindowSize() winSize = RL_GetScreenSize()
RL_SetWindowTitle( "ReiLuaGui examples" ) RL_SetWindowTitle( "ReiLuaGui examples" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )

View File

@@ -138,7 +138,7 @@ function init()
local monitor = 0 local monitor = 0
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
winSize = RL_GetWindowSize() winSize = RL_GetScreenSize()
RL_SetWindowTitle( "ReiLuaGui Test" ) RL_SetWindowTitle( "ReiLuaGui Test" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )

View File

@@ -4,7 +4,7 @@ local camera = -1
local texture = -1 local texture = -1
local textureSize = { 256, 96 } local textureSize = { 256, 96 }
local res = { 384, 216 } local res = { 384, 216 }
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
local winScale = 4 local winScale = 4
local framebuffer = -1 local framebuffer = -1

View File

@@ -21,7 +21,7 @@ local matrix = {}
function init() function init()
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT ) RL_SetWindowState( FLAG_VSYNC_HINT )

View File

@@ -8,7 +8,7 @@ local textImage = -1
function init() function init()
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT ) RL_SetWindowState( FLAG_VSYNC_HINT )

View File

@@ -22,7 +22,7 @@ function init()
local monitor = 0 local monitor = 0
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowSize( winSize ) RL_SetWindowSize( winSize )

View File

@@ -15,7 +15,7 @@ local animSpeed = 60
function init() function init()
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT ) RL_SetWindowState( FLAG_VSYNC_HINT )

View File

@@ -13,7 +13,7 @@ local matrix = {}
function init() function init()
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT ) RL_SetWindowState( FLAG_VSYNC_HINT )

View File

@@ -34,7 +34,7 @@ function process( delta )
end end
if RL_IsWindowResized() then if RL_IsWindowResized() then
winSize = RL_GetWindowSize() winSize = RL_GetScreenSize()
end end
end end

View File

@@ -222,7 +222,7 @@ end
function process( delta ) function process( delta )
if RL_IsWindowResized() then if RL_IsWindowResized() then
winSize:set( RL_GetWindowSize() ) winSize:set( RL_GetScreenSize() )
end end
playerMovement( delta ) playerMovement( delta )

View File

@@ -6,7 +6,7 @@ local function setupWindow()
local monitor = 0 local monitor = 0
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT ) RL_SetWindowState( FLAG_VSYNC_HINT )

View File

@@ -11,7 +11,7 @@ local secondsLoc
function init() function init()
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT ) RL_SetWindowState( FLAG_VSYNC_HINT )

View File

@@ -13,7 +13,7 @@ function init()
local monitor = 0 local monitor = 0
local mPos = RL_GetMonitorPosition( monitor ) local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor ) local mSize = RL_GetMonitorSize( monitor )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
RL_SetWindowTitle( "Waving cubes" ) RL_SetWindowTitle( "Waving cubes" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) RL_SetWindowState( FLAG_WINDOW_RESIZABLE )

View File

@@ -11,7 +11,7 @@ end
function process( delta ) function process( delta )
if RL_IsKeyPressed( KEY_ENTER ) then if RL_IsKeyPressed( KEY_ENTER ) then
local textSize = RL_MeasureText( 0, text, 20, 2 ) local textSize = RL_MeasureText( 0, text, 20, 2 )
local winSize = RL_GetWindowSize() local winSize = RL_GetScreenSize()
textColor = BLUE textColor = BLUE
textPos = { winSize[1] / 2 - textSize[1] / 2, winSize[2] / 2 - textSize[2] / 2 } textPos = { winSize[1] / 2 - textSize[1] / 2, winSize[2] / 2 - textSize[2] / 2 }

View File

@@ -17,7 +17,7 @@ int lcoreSetWindowMinSize( lua_State *L );
int lcoreGetMonitorPosition( lua_State *L ); int lcoreGetMonitorPosition( lua_State *L );
int lcoreGetMonitorSize( lua_State *L ); int lcoreGetMonitorSize( lua_State *L );
int lcoreGetWindowPosition( lua_State *L ); int lcoreGetWindowPosition( lua_State *L );
int lcoreGetWindowSize( lua_State *L ); int lcoreGetScreenSize( lua_State *L );
int lcoreSetWindowState( lua_State *L ); int lcoreSetWindowState( lua_State *L );
int lcoreIsWindowState( lua_State *L ); int lcoreIsWindowState( lua_State *L );
int lcoreClearWindowState( lua_State *L ); int lcoreClearWindowState( lua_State *L );

View File

@@ -298,13 +298,13 @@ int lcoreGetWindowPosition( lua_State *L ) {
} }
/* /*
> size = RL_GetWindowPosition() > size = RL_GetScreenSize()
Get window size Get screen size
- Success return Vector2 - Success return Vector2
*/ */
int lcoreGetWindowSize( lua_State *L ) { int lcoreGetScreenSize( lua_State *L ) {
Vector2 size = (Vector2){ GetScreenWidth(), GetScreenHeight() }; Vector2 size = (Vector2){ GetScreenWidth(), GetScreenHeight() };
uluaPushVector2( L, size ); uluaPushVector2( L, size );

View File

@@ -681,7 +681,7 @@ void luaRegister() {
lua_register( L, "RL_GetMonitorPosition", lcoreGetMonitorPosition ); lua_register( L, "RL_GetMonitorPosition", lcoreGetMonitorPosition );
lua_register( L, "RL_GetMonitorSize", lcoreGetMonitorSize ); lua_register( L, "RL_GetMonitorSize", lcoreGetMonitorSize );
lua_register( L, "RL_GetWindowPosition", lcoreGetWindowPosition ); lua_register( L, "RL_GetWindowPosition", lcoreGetWindowPosition );
lua_register( L, "RL_GetWindowSize", lcoreGetWindowSize ); lua_register( L, "RL_GetScreenSize", lcoreGetScreenSize );
lua_register( L, "RL_SetWindowState", lcoreSetWindowState ); lua_register( L, "RL_SetWindowState", lcoreSetWindowState );
lua_register( L, "RL_IsWindowState", lcoreIsWindowState ); lua_register( L, "RL_IsWindowState", lcoreIsWindowState );
lua_register( L, "RL_ClearWindowState", lcoreClearWindowState ); lua_register( L, "RL_ClearWindowState", lcoreClearWindowState );