#include <Window.h>
Builder pattern class for Window.
◆ build()
std::variant< std::unique_ptr< Window >, Error > ne::WindowBuilder::build |
( |
| ) |
|
Builds/creates a new window with the configured parameters.
- Returns
- Returns error if something went wrong or created window otherwise.
- Warning
- This function should only be called from the main thread.
◆ withFullscreenMode()
WindowBuilder & ne::WindowBuilder::withFullscreenMode |
( |
bool |
bEnableFullscreen | ) |
|
Whether a window should be shown in the fullscreen mode or not.
- Parameters
-
bEnableFullscreen | Fullscreen mode. |
- Returns
- Builder.
◆ withIcon()
WindowBuilder & ne::WindowBuilder::withIcon |
( |
const std::filesystem::path & |
pathToIcon | ) |
|
Defines the icon of a window that we will create.
- Parameters
-
pathToIcon | Path to the image (.png). |
- Returns
- Builder.
◆ withMaximizedState()
WindowBuilder & ne::WindowBuilder::withMaximizedState |
( |
bool |
bMaximized | ) |
|
Whether the window should be maximized after creation or not. Does nothing for fullscreen windows.
- Parameters
-
bMaximized | Should window be maximized or not. |
- Returns
- Builder.
◆ withSize()
WindowBuilder & ne::WindowBuilder::withSize |
( |
int |
iWidth, |
|
|
int |
iHeight |
|
) |
| |
Defines the size of a window that we will create.
- Parameters
-
iWidth | Width of the window. |
iHeight | Height of the window. |
- Returns
- Builder.
◆ withSplashScreenMode()
WindowBuilder & ne::WindowBuilder::withSplashScreenMode |
( |
bool |
bIsSplashScreen | ) |
|
Whether the window should look like a splash screen or not (no border, title, buttons, etc). Does nothing for fullscreen windows.
- Parameters
-
bIsSplashScreen | Should window look like a splash screen or not. |
- Returns
- Builder.
◆ withTitle()
WindowBuilder & ne::WindowBuilder::withTitle |
( |
std::string_view |
sWindowTitle | ) |
|
Defines the name of a window that we will create.
- Parameters
-
sWindowTitle | Title of the window. |
- Returns
- Builder.
◆ withVisibility()
Defines the visibility of a window that we will create. Does nothing for fullscreen windows.
- Parameters
-
bShow | Visibility of the window. |
- Returns
- Builder.
◆ params
Configured window parameters.
The documentation for this class was generated from the following files:
- src/engine_lib/public/game/Window.h
- src/engine_lib/private/window/Window.cpp