Hymn to Beauty
C++ 3D Engine
SavePromptWindow.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4#include <vector>
5#include <string>
6
7namespace GUI {
10 public:
12 void Show();
13
15
18 bool IsVisible() const;
19
21
24 void SetVisible(bool visible);
25
27
30 void SetDecision(int option);
31
33
36 int GetDecision() const;
37
39 void ResetDecision();
40
42
45 void SetTitle(const std::string& newTitle);
46
47 private:
48 std::string title;
49 bool visible = false;
50 int decision = -1;
51};
52} // namespace GUI
A window that asks the user if they want to save before quitting.
Definition: SavePromptWindow.hpp:9
bool IsVisible() const
Get whether the window is visible.
Definition: SavePromptWindow.cpp:48
void Show()
Show the window and let the user decide if they want to save.
Definition: SavePromptWindow.cpp:10
void SetDecision(int option)
Sets decision to true or false.
Definition: SavePromptWindow.cpp:56
void SetVisible(bool visible)
Set whether the window should be visible.
Definition: SavePromptWindow.cpp:52
int GetDecision() const
Fetches what the player picked.
Definition: SavePromptWindow.cpp:36
void SetTitle(const std::string &newTitle)
Set the title of the window.
Definition: SavePromptWindow.cpp:44
void ResetDecision()
Resets the decision to -1.
Definition: SavePromptWindow.cpp:40
Definition: AssetEditor.hpp:9