Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
NDK class that represents the application, it offers a set of tools to ease the development. More...
Public Member Functions | |
Application () | |
Constructs an Application object without passing command-line arguments. More... | |
Application (int argc, char *argv[]) | |
Constructs an Application object with command-line arguments. More... | |
Application (const Application &)=delete | |
Application (Application &&)=delete | |
~Application () | |
Destructs the application object. More... | |
template<typename T , typename... Args> | |
T & | AddWindow (Args &&... args) |
Adds a window to the application. More... | |
template<typename... Args> | |
World & | AddWorld (Args &&... args) |
Adds a world to the application. More... | |
void | EnableConsole (bool enable) |
Enable/disable debug console. More... | |
void | EnableFPSCounter (bool enable) |
Enable/disable debug FPS counter. More... | |
ConsoleOverlay & | GetConsoleOverlay (std::size_t windowIndex=0U) |
Gets the console overlay for a specific window. More... | |
FPSCounterOverlay & | GetFPSCounterOverlay (std::size_t windowIndex=0U) |
Gets the console overlay for a specific window. More... | |
const std::set< Nz::String > & | GetOptions () const |
Gets the options used to start the application. More... | |
const std::map< Nz::String, Nz::String > & | GetParameters () const |
Gets the parameters used to start the application. More... | |
float | GetUpdateTime () const |
Gets the update time of the application. More... | |
bool | HasOption (const Nz::String &option) const |
Query for a command-line option. More... | |
bool | HasParameter (const Nz::String &key, Nz::String *value) const |
Query for a command-line option. More... | |
bool | IsConsoleEnabled () const |
Checks if the console overlay is enabled. More... | |
bool | IsFPSCounterEnabled () const |
Checks if the FPS counter overlay is enabled. More... | |
bool | Run () |
Runs the application by updating worlds, taking care about windows, ... | |
void | MakeExitOnLastWindowClosed (bool exitOnClosedWindows) |
Makes the application exit when there's no more open window. More... | |
void | Quit () |
Quits the application. | |
Application & | operator= (const Application &)=delete |
Application & | operator= (Application &&)=delete |
Static Public Member Functions | |
static Application * | Instance () |
Gets the singleton instance of the application. More... | |
NDK class that represents the application, it offers a set of tools to ease the development.
|
inline |
Constructs an Application object without passing command-line arguments.
This calls Sdk::Initialize()
Ndk::Application::Application | ( | int | argc, |
char * | argv[] | ||
) |
Constructs an Application object with command-line arguments.
Pass the argc and argv arguments from the main function.
Command-line arguments can be retrieved by application methods
This calls Sdk::Initialize()
|
inline |
Destructs the application object.
This destroy all worlds and windows and then calls Sdk::Uninitialize
T & Ndk::Application::AddWindow | ( | Args &&... | args | ) |
Adds a window to the application.
args | Arguments used to create the window |
World & Ndk::Application::AddWorld | ( | Args &&... | args | ) |
Adds a world to the application.
args | Arguments used to create the world |
|
inline |
Enable/disable debug console.
enable | Should the console overlay be enabled |
|
inline |
Enable/disable debug FPS counter.
enable | Should the FPS counter be displayed |
|
inline |
Gets the console overlay for a specific window.
windowIndex | Index of the window to get |
|
inline |
Gets the console overlay for a specific window.
windowIndex | Index of the window to get |
|
inline |
Gets the options used to start the application.
Options are defined as "-optionName" in command-line and are always lower-case
|
inline |
Gets the parameters used to start the application.
Parameters are defined as "-key=value" in command-line, their key is lower-case but value capitals are kept.
|
inline |
Gets the update time of the application.
|
inline |
Query for a command-line option.
option | Option name |
|
inline |
Query for a command-line option.
key | Parameter name |
value | Optional string to receive the parameter value |
|
inlinestatic |
Gets the singleton instance of the application.
|
inline |
Checks if the console overlay is enabled.
|
inline |
Checks if the FPS counter overlay is enabled.
|
inline |
Makes the application exit when there's no more open window.
exitOnClosedWindows | Should exit be called when no more window is open |