CraftStudio Wiki
CraftStudio Wiki

CraftStudio.Screen.GetSize[]

[table] CraftStudio.Screen.GetSize()

Returns the screen / window current size in pixels as a table with x and y as the keys.

Example: Print the window width and height[]

local windowSize = CraftStudio.Screen.GetSize()
print( "Width: " .. windowSize.x )
print( "Height: " .. windowSize.y )

CraftStudio.Screen.SetSize[]

CraftStudio.Screen.SetSize( [number] width, [number] height )

Sets the screen / window size in pixels.

CraftStudio.Screen.SetResizable[]

CraftStudio.Screen.SetResizable( [boolean] resizable )

Sets whether the window is resizable by the user when the game is running.