Mountain  1.0.0
Simple C++ 2D Game Framework
Mountain::Window Class Reference

A wrapper for the main window. More...

#include <window.hpp>

+ Collaboration diagram for Mountain::Window:

Static Public Member Functions

static MOUNTAIN_API void SetPosition (Vector2i newPosition)
 Get the screen position in pixels of the window.
 
static MOUNTAIN_API void SetSize (Vector2i newSize)
 Get the size in pixels of the window.
 
static MOUNTAIN_API bool_t GetShouldClose ()
 Get whether the window should close.
 
static MOUNTAIN_API void SetShouldClose (bool_t newShouldClose)
 Set whether the window should close.
 
static MOUNTAIN_API void MakeContextCurrent ()
 Set the window to be the current context.
 
static MOUNTAIN_API void SetVisible (bool_t newVisible)
 Get the native handle of the window. More...
 
static MOUNTAIN_API void SetIcon (const Pointer< Texture > &newIcon)
 Set the icon for the window.
 
static MOUNTAIN_API void SetCursorHidden (bool_t newCursorHidden)
 Handle hiding or displaying the cursor. More...
 
static MOUNTAIN_API void SetCursorPosition (Vector2 newPosition)
 Set the mouse cursor position in screen space.
 
static MOUNTAIN_API void SetVSync (bool_t newVsync)
 
static MOUNTAIN_API void SetWindowMode (WindowMode newWindowMode)
 
static MOUNTAIN_API std::string_view GetTitle ()
 Get the index of the screen on which this window currently is.
 
static MOUNTAIN_API void SetTitle (const std::string &newTitle)
 

Static Public Attributes

static MOUNTAIN_API Event< Vector2ionPositionChanged
 Event called when the window position changed. The parameter is the new position.
 
static MOUNTAIN_API Event< Vector2ionSizeChanged
 Event called when the window size changed. The parameter is the new size.
 

Friends

class Renderer
 
class Game
 
class Time
 

Detailed Description

A wrapper for the main window.

Definition at line 26 of file window.hpp.

Member Function Documentation

◆ SetCursorHidden()

static MOUNTAIN_API void Mountain::Window::SetCursorHidden ( bool_t  newCursorHidden)
static

Handle hiding or displaying the cursor.

Parameters
newCursorHiddentrue hides, false displays

◆ SetVisible()

static MOUNTAIN_API void Mountain::Window::SetVisible ( bool_t  newVisible)
static

Get the native handle of the window.

Get whether the window is visible or hidden. Set whether the window should be visible or hidden.


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