Overview
Window functions handle the creation, configuration, and management of the game window, including fullscreen mode, window state, and monitor information.Window Lifecycle
initWindow
Initializes window and OpenGL context.Window width in pixels
Window height in pixels
Window title
closeWindow
Closes window and unloads OpenGL context.windowShouldClose
Checks if KEY_ESCAPE pressed or Close icon pressed. Returns:Boolean - True if window should close
Window State
isWindowReady
Checks if window has been initialized successfully. Returns:Boolean - True if window is ready
isWindowFullscreen
Checks if window is currently fullscreen. Returns:Boolean - True if fullscreen
isWindowHidden
Checks if window is currently hidden. Returns:Boolean - True if hidden
isWindowMinimized
Checks if window is currently minimized. Returns:Boolean - True if minimized
isWindowMaximized
Checks if window is currently maximized. Returns:Boolean - True if maximized
isWindowFocused
Checks if window is currently focused. Returns:Boolean - True if focused
isWindowResized
Checks if window has been resized last frame. Returns:Boolean - True if resized
Window Configuration
toggleFullscreen
Toggles window state: fullscreen/windowed.toggleBorderlessWindowed
Toggles window state: borderless windowed mode.maximizeWindow
Sets window state: maximized, if resizable.minimizeWindow
Sets window state: minimized, if resizable.restoreWindow
Sets window state: not minimized/maximized.setWindowTitle
Sets title for window.New window title
setWindowPosition
Sets window position on screen.X position in pixels
Y position in pixels
setWindowMinSize
Sets window minimum dimensions (for FLAG_WINDOW_RESIZABLE).Minimum width
Minimum height
setWindowMaxSize
Sets window maximum dimensions (for FLAG_WINDOW_RESIZABLE).Maximum width
Maximum height
setWindowSize
Sets window dimensions.New width
New height
setWindowOpacity
Sets window opacity (0.0f-1.0f).Opacity value from 0.0 (transparent) to 1.0 (opaque)
setWindowFocused
Sets window focused.Screen Information
getScreenWidth
Returns current screen width. Returns:Number - Screen width in pixels
getScreenHeight
Returns current screen height. Returns:Number - Screen height in pixels
getRenderWidth
Returns current render width (it considers HiDPI). Returns:Number - Render width
getRenderHeight
Returns current render height (it considers HiDPI). Returns:Number - Render height
getWindowPosition
Returns window position on screen. Returns:Vector2 - Window position
getWindowScaleDPI
Returns window scale DPI factor. Returns:Vector2 - DPI scale factor
Monitor Functions
getMonitorCount
Returns number of connected monitors. Returns:Number - Monitor count
getCurrentMonitor
Returns current monitor where window is placed. Returns:Number - Monitor index
getMonitorWidth
Returns specified monitor width in pixels.Monitor index
Number - Monitor width
getMonitorHeight
Returns specified monitor height in pixels.Monitor index
Number - Monitor height
getMonitorPhysicalWidth
Returns specified monitor physical width in millimeters.Monitor index
Number - Physical width in mm
getMonitorPhysicalHeight
Returns specified monitor physical height in millimeters.Monitor index
Number - Physical height in mm
getMonitorRefreshRate
Returns specified monitor refresh rate.Monitor index
Number - Refresh rate in Hz
getMonitorName
Returns specified monitor name.Monitor index
String - Monitor name
Clipboard Functions
setClipboardText
Sets clipboard text content.Text to copy to clipboard
getClipboardText
Returns clipboard text content. Returns:String - Clipboard text
Cursor Functions
showCursor
Shows cursor.hideCursor
Hides cursor.isCursorHidden
Checks if cursor is not visible. Returns:Boolean - True if cursor is hidden
enableCursor
Enables cursor (unlock cursor).disableCursor
Disables cursor (lock cursor).isCursorOnScreen
Checks if cursor is on the screen. Returns:Boolean - True if cursor is on screen
The window automatically sets
FLAG_WINDOW_TOPMOST when initialized in Talon. This keeps your game window on top during development.