18#ifndef HEADER_SERVER_CONFIGURATION_DIALOG_HPP
19#define HEADER_SERVER_CONFIGURATION_DIALOG_HPP
21#include "guiengine/modaldialog.hpp"
22#include "race/race_manager.hpp"
29 class IconButtonWidget;
49 void updateMoreOption(
int game_mode);
53 m_self_destroy =
false;
54 switch (RaceManager::get()->getMinorMode())
56 case RaceManager::MINOR_MODE_NORMAL_RACE:
62 case RaceManager::MINOR_MODE_TIME_TRIAL:
68 case RaceManager::MINOR_MODE_FREE_FOR_ALL:
74 case RaceManager::MINOR_MODE_CAPTURE_THE_FLAG:
80 case RaceManager::MINOR_MODE_SOCCER:
83 m_prev_value = soccer_goal ? 1 : 0;
93 loadFromFile(
"online/server_configuration_dialog.stkgui");
98 GUIEngine::EventPropagation
processEvent(
const std::string& source);
102 void onEnterPressedInternal() { m_self_destroy =
true; }
106 m_self_destroy =
true;
113 ModalDialog::dismiss();
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:56
void loadFromFile(const char *xmlFile)
Load a XML file to create the dialog from.
Definition: modaldialog.cpp:69
ModalDialog(const float percentWidth, const float percentHeight, ModalDialogLocation location=MODAL_DIALOG_LOCATION_CENTER)
Creates a modal dialog with given percentage of screen width and height.
Definition: modaldialog.cpp:54
Definition: server_configuration_dialog.hpp:33
GUIEngine::EventPropagation processEvent(const std::string &source)
Returns whether to block event propagation (usually, you will want to block events you processed)
Definition: server_configuration_dialog.cpp:75
void init()
Optional callback invoked after widgets have been add()ed.
Definition: server_configuration_dialog.cpp:55
void beforeAddingWidgets()
Optional callback invoked very early, before widgets have been added (contrast with init(),...
Definition: server_configuration_dialog.cpp:35
void onUpdate(float dt)
Override to be notified of updates.
Definition: server_configuration_dialog.hpp:110
bool onEscapePressed()
Override to change what happens on escape pressed.
Definition: server_configuration_dialog.hpp:104
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33