lovr.system
EditThe lovr.system
provides information about the current platform and hardware.
It also interfaces with the desktop window and window input.
System Information
lovr.system.getCoreCount | Get the number of logical cores. |
lovr.system.getOS | Get the current operating system. |
lovr.system.requestPermission | Request permission to use a feature. |
Keyboard
lovr.system.hasKeyRepeat | Check if key repeat is enabled. |
lovr.system.isKeyDown | Get the state of a key. |
lovr.system.setKeyRepeat | Enable or disable key repeat. |
lovr.system.wasKeyPressed | Check if a key was pressed this frame. |
lovr.system.wasKeyReleased | Check if a key was released this frame. |
Mouse
lovr.system.getMousePosition | Get the position of the mouse. |
lovr.system.getMouseX | Get the x position of the mouse. |
lovr.system.getMouseY | Get the y position of the mouse. |
lovr.system.isMouseDown | Check if a mouse button is pressed. |
lovr.system.wasMousePressed | Check if a mouse button was pressed this frame. |
lovr.system.wasMouseReleased | Check if a mouse button was released this frame. |
Clipboard
lovr.system.getClipboardText | Get the clipboard text. |
lovr.system.setClipboardText | Set the clipboard text. |
Window
lovr.system.getWindowDensity | Get the window pixel density. |
lovr.system.getWindowDimensions | Get the dimensions of the window. |
lovr.system.getWindowHeight | Get the height of the window. |
lovr.system.getWindowWidth | Get the width of the window. |
lovr.system.isWindowFocused | Check if the desktop window is focused. |
lovr.system.isWindowOpen | Check if the desktop window is open. |
lovr.system.isWindowVisible | Check if the desktop window is visible. |
lovr.system.openWindow | Open the desktop window. |
lovr.system.pollEvents | Poll the OS for new window events. |