|
JNGL
Easy to use cross-platform 2D game library
|
Parameters used to initialize the main window. More...
#include <jngl/AppParameters.hpp>
Public Attributes | |
| std::function< std::shared_ptr< jngl::Work >()> | start |
| A factory function which creates the first jngl::Work. | |
| std::string | displayName |
| Display name of the application which will be used in the window title for example. | |
| std::optional< jngl::Vec2 > | screenSize |
| Size of the canvas in screen pixels, see jngl::getScreenSize() | |
| std::optional< bool > | fullscreen |
| If set, can be used to control whether to run in fullscreen or windowed mode on supported platforms. | |
| std::optional< std::pair< int, int > > | minAspectRatio |
| std::optional< std::pair< int, int > > | maxAspectRatio |
| std::optional< uint32_t > | steamAppId |
| If set and JNGL_STEAMWORKS has been passed to CMake, JNGL will ensure the app runs through Steam and initialize the SteamAPI. | |
| bool | pixelArt = false |
| Activates pixel-perfect magnifying of textures (nearest-neighbor interpolation) | |
| std::function< double(int, int)> | scaleFactor |
| This function can be set to make adjustments to the scale factor used by jngl::getScaleFactor() after the window has been created. | |
Parameters used to initialize the main window.
Definition at line 19 of file AppParameters.hpp.
| std::function<std::shared_ptr<jngl::Work>()> start |
A factory function which creates the first jngl::Work.
Definition at line 21 of file AppParameters.hpp.
| std::string displayName |
Display name of the application which will be used in the window title for example.
Definition at line 24 of file AppParameters.hpp.
| std::optional<jngl::Vec2> screenSize |
Size of the canvas in screen pixels, see jngl::getScreenSize()
If not specified JNGL will create a fullscreen Window with the maximum of space available.
Definition at line 29 of file AppParameters.hpp.
| std::optional<bool> fullscreen |
If set, can be used to control whether to run in fullscreen or windowed mode on supported platforms.
If not set, it will run fullscreen when NDEBUG is defined (i.e. in Release mode).
Definition at line 33 of file AppParameters.hpp.
| std::optional<std::pair<int, int> > minAspectRatio |
Definition at line 35 of file AppParameters.hpp.
| std::optional<std::pair<int, int> > maxAspectRatio |
Definition at line 36 of file AppParameters.hpp.
| std::optional<uint32_t> steamAppId |
If set and JNGL_STEAMWORKS has been passed to CMake, JNGL will ensure the app runs through Steam and initialize the SteamAPI.
Definition at line 40 of file AppParameters.hpp.
| bool pixelArt = false |
Activates pixel-perfect magnifying of textures (nearest-neighbor interpolation)
Definition at line 43 of file AppParameters.hpp.
| std::function<double(int, int)> scaleFactor |
This function can be set to make adjustments to the scale factor used by jngl::getScaleFactor() after the window has been created.
It gets the actual window dimensions in actual pixels as parameters (width, height) and must return the desired new scale factor.
For example if you don't want to force an aspect ratio, but want to have a consistent scaling based on a 1920x1080 screen, you could use:
Definition at line 59 of file AppParameters.hpp.