This class implements a basic interface to the underlying operating system.
More...
#include <SystemContext.h>
This class implements a basic interface to the underlying operating system.
It provides functionality to accomplish environment dependant functionality like changing the screen resolution (or window size), show and hide the mouse cursor and similar.
This class usually only has one instance that can be fetched from NeoEngine with NeoEngine::getSystemContext().
virtual Neo::SystemContext::~SystemContext |
( |
void |
| ) |
|
|
inlinevirtual |
virtual void Neo::SystemContext::getScreenSize |
( |
unsigned int * |
width, |
|
|
unsigned int * |
height |
|
) |
| |
|
pure virtual |
Fetches the current screen resolution or window size in pixels.
Needs to be used like this:
unsigned int w, h;
system->getScreenSize(&w, &h);
- Parameters
-
width | A pointer to an unsigned integer variable. |
height | A pointer to an unsigned integer variable. |
virtual Vector2 Neo::SystemContext::getScreenSize |
( |
| ) |
|
|
pure virtual |
Returns the current screen resolution or window size in pixels.
- Returns
- A Vector2 with the current window size.
virtual unsigned long Neo::SystemContext::getSystemTick |
( |
void |
| ) |
|
|
pure virtual |
Returns the current system time in millis.
- Returns
- The current system tick.
virtual const char* Neo::SystemContext::getWorkingDirectory |
( |
void |
| ) |
|
|
pure virtual |
Returns the working directory as a C string.
- Returns
- The working directory path.
virtual void Neo::SystemContext::hideCursor |
( |
void |
| ) |
|
|
inlinevirtual |
virtual void Neo::SystemContext::setCursorPosition |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inlinevirtual |
Changes the current cursor position.
- Parameters
-
x | X-Coordinate in pixels |
y | Y-Coordinate in pixels |
virtual void Neo::SystemContext::setScreenSize |
( |
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
|
pure virtual |
Changes the screen resolution or the window size depending on if the window is fullscreen.
- Parameters
-
width | The new width in pixels. |
height | The new height in pixels. |
virtual void Neo::SystemContext::setWindowTitle |
( |
const char * |
title | ) |
|
|
pure virtual |
Changes the window title of the game window.
- Parameters
-
title | The new title that shall be used. |
virtual void Neo::SystemContext::showCursor |
( |
void |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: