|
R-Type
|
Class representing a window wrapper for sf::RenderWindow with additional functionality. More...
#include <SfmlTypes.hpp>
Public Member Functions | |
| Window (int width=1920, int height=1080, const std::string &title="Game window") | |
| Constructor for Window. More... | |
| const sf::RenderWindow & | getWindow () const override |
| Returns the wrapped sf::RenderWindow. More... | |
| sf::RenderWindow & | getWindow () override |
| Returns the wrapped sf::RenderWindow. More... | |
| void | draw (const sf::Drawable &drawable) override |
| Draws a sf::Drawable object on the window. More... | |
| void | setView (const IView< sf::View > &view) override |
| Sets the view of the window. More... | |
| void | setFramerateLimit (const float rate) override |
| Set the maximum framerate of the window. More... | |
| bool | isOpen () const override |
| Checks if the window is open. More... | |
| bool | pollEvent (IEvent< sf::Event > &event) override |
| Polls and retrieves the next event. More... | |
| void | close () override |
| Closes the window. More... | |
| void | display () override |
| Displays the contents of the window. More... | |
| void | clear () override |
| Clears the contents of the window. More... | |
| void | create (int width, int height, const std::string &title) override |
| Creates a new window with the specified dimensions and title. More... | |
| Vector2< float > | mapPixelToCoords (const Vector2< int > &pos) |
| Maps pixel coordinates to world coordinates. More... | |
Public Member Functions inherited from GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable > | |
| virtual | ~IWindow ()=default |
| Destructor. More... | |
Class representing a window wrapper for sf::RenderWindow with additional functionality.
|
inline |
Constructor for Window.
| width | The width of the window |
| height | The height of the window |
| title | The title of the window |
|
inlineoverridevirtual |
Clears the contents of the window.
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Closes the window.
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Creates a new window with the specified dimensions and title.
| width | The width of the new window |
| height | The height of the new window |
| title | The title of the new window |
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Displays the contents of the window.
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Draws a sf::Drawable object on the window.
| drawable | The object to be drawn |
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Returns the wrapped sf::RenderWindow.
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Returns the wrapped sf::RenderWindow.
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Checks if the window is open.
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
Maps pixel coordinates to world coordinates.
| pos | The pixel coordinates to map |
|
inlineoverridevirtual |
Polls and retrieves the next event.
| event | The event to be filled with the polled event |
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Set the maximum framerate of the window.
| rate | the maximum framerate |
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.
|
inlineoverridevirtual |
Sets the view of the window.
| view | The view to set |
Implements GameEngine::IWindow< sf::RenderWindow, sf::View, sf::Event, sf::Drawable >.