JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Public Attributes | List of all members
AppParameters Struct Reference

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::Vec2screenSize
 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)
 

Detailed Description

Parameters used to initialize the main window.

Definition at line 19 of file AppParameters.hpp.

Collaboration diagram for AppParameters:
[legend]

Member Data Documentation

◆ start

A factory function which creates the first jngl::Work.

Definition at line 21 of file AppParameters.hpp.

◆ displayName

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.

◆ 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.

◆ fullscreen

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.

◆ minAspectRatio

std::optional<std::pair<int, int> > minAspectRatio

Definition at line 35 of file AppParameters.hpp.

◆ maxAspectRatio

std::optional<std::pair<int, int> > maxAspectRatio

Definition at line 36 of file AppParameters.hpp.

◆ steamAppId

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.

◆ pixelArt

bool pixelArt = false

Activates pixel-perfect magnifying of textures (nearest-neighbor interpolation)

Definition at line 43 of file AppParameters.hpp.


The documentation for this struct was generated from the following file: