Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Source/Engine/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ bool Simulation::Parse( void ) {
return true;
}

void LeaveOption() {exit(0);}
/**\brief Handle User Input
*/
void Simulation::HandleInput() {
Expand Down Expand Up @@ -682,7 +683,11 @@ void Simulation::HandleInput() {

if( Input::HandleSpecificEvent( events, InputEvent( KEY, KEYTYPED, SDLK_ESCAPE ) ) )
{
quit = true;
Dialogs::OptionsWindow();
Button *leave = new Button( 100, 450-50, 100, 30, "Leave the game", LeaveOption);
Window* win = (Window*)(UI::Search("/Window'Options'/"));
win->SetH(450);
win->AddChild(leave);
}
}

Expand Down