MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / notifyGuiAction

Method notifyGuiAction

source/modes/GameMode.cpp:1140–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1138}
1139
1140void GameMode::notifyGuiAction(GuiAction guiAction)
1141{
1142 switch(guiAction)
1143 {
1144 case GuiAction::ButtonPressedCreatureWorker:
1145 {
1146 if(ODClient::getSingleton().isConnected())
1147 {
1148 ClientNotification *clientNotification = new ClientNotification(
1149 ClientNotificationType::askPickupWorker);
1150 ODClient::getSingleton().queueClientNotification(clientNotification);
1151 }
1152 break;
1153 }
1154 case GuiAction::ButtonPressedCreatureFighter:
1155 {
1156 if(ODClient::getSingleton().isConnected())
1157 {
1158 ClientNotification *clientNotification = new ClientNotification(
1159 ClientNotificationType::askPickupFighter);
1160 ODClient::getSingleton().queueClientNotification(clientNotification);
1161 }
1162 break;
1163 }
1164 default:
1165 break;
1166 }
1167}
1168
1169bool GameMode::onClickYesQuitMenu(const CEGUI::EventArgs& /*arg*/)
1170{

Callers 1

operator()Method · 0.45

Calls 2

isConnectedMethod · 0.45

Tested by

no test coverage detected