Hymn to Beauty
C++ 3D Engine
GUI::SavePromptWindow Class Reference

A window that asks the user if they want to save before quitting. More...

#include <SavePromptWindow.hpp>

Public Member Functions

void Show ()
 Show the window and let the user decide if they want to save. More...
 
bool IsVisible () const
 Get whether the window is visible. More...
 
void SetVisible (bool visible)
 Set whether the window should be visible. More...
 
void SetDecision (int option)
 Sets decision to true or false. More...
 
int GetDecision () const
 Fetches what the player picked. More...
 
void ResetDecision ()
 Resets the decision to -1. More...
 
void SetTitle (const std::string &newTitle)
 Set the title of the window. More...
 

Detailed Description

A window that asks the user if they want to save before quitting.

Member Function Documentation

◆ GetDecision()

int SavePromptWindow::GetDecision ( ) const

Fetches what the player picked.

Returns
0: Save, 1: Don't save, 2: cancel.

◆ IsVisible()

bool SavePromptWindow::IsVisible ( ) const

Get whether the window is visible.

Returns
Whether the window is visible.

◆ ResetDecision()

void SavePromptWindow::ResetDecision ( )

Resets the decision to -1.

◆ SetDecision()

void GUI::SavePromptWindow::SetDecision ( int  option)

Sets decision to true or false.

Parameters
optionIf the decision should be 0: Save, 1: Don't save, *2: cancel.

◆ SetTitle()

void SavePromptWindow::SetTitle ( const std::string &  newTitle)

Set the title of the window.

Parameters
newTitleThe new title of the window.

◆ SetVisible()

void SavePromptWindow::SetVisible ( bool  visible)

Set whether the window should be visible.

Parameters
visibleWhether the window should be visible.

◆ Show()

void SavePromptWindow::Show ( )

Show the window and let the user decide if they want to save.


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