System
Description¶
This class return all platform system information that engine is running. This class is as singleton, all methods are virtual and in C++ should be acessed by instance(). In Lua they can be acessed directly. For example:
int screenWidth = System::instance().getScreenWidth();
screenWidth = System.getScreenWidth()
Methods¶
Type | Name | Langs |
---|---|---|
static System& | instance | |
virtual int | getScreenWidth | | |
virtual int | getScreenHeight | | |
virtual void | showVirtualKeyboard | | |
virtual void | isFullscreen | | |
virtual void | requestFullscreen | | |
virtual void | exitFullscreen | | |
virtual void | getDirSeparator | | |
virtual void | getAssetPath | | |
virtual void | getUserDataPath | | |
virtual void | getLuaPath | | |
virtual void | getShaderPath | | |
Methods details¶
instance ()¶
- static System& instance()
Return instace of singleton System class.
getScreenWidth¶
- virtual int getScreenWidth()
Return size o screen width based on system platform resolution.
getScreenHeight¶
- virtual int getScreenHeight()
Return size o screen height based on system platform resolution.
showVirtualKeyboard¶
- virtual void showVirtualKeyboard()
Show virtual keyboard if device supports it.
hideVirtualKeyboard¶
- virtual void hideVirtualKeyboard()
Hide virtual keyboard if device supports it.
isFullscreen¶
- virtual bool isFullscreen()
Return true if fullscreen.
isFullscreen¶
- virtual bool isFullscreen()
Return true if fullscreen.
requestFullscreen¶
- virtual void requestFullscreen()
Request system for enter fullscreen.
exitFullscreen¶
- virtual void exitFullscreen()
Request system for exit fullscreen.
getDirSeparator¶
- virtual char getDirSeparator()
Return system dir separador. Ex: "/" for Linux and "\" for Windows
getAssetPath¶
- virtual std::string getAssetPath()
Return assets directory path.
getUserDataPath¶
- virtual std::string getUserDataPath()
Return user data directory path with write permission.
getLuaPath¶
- virtual std::string getLuaPath()
Return Lua directory path.
getShaderPath¶
- virtual std::string getShaderPath()
Return shader data directory.