| 828 | } |
| 829 | |
| 830 | void EditorMode::notifyGuiAction(GuiAction guiAction) |
| 831 | { |
| 832 | switch(guiAction) |
| 833 | { |
| 834 | case GuiAction::ButtonPressedCreatureWorker: |
| 835 | { |
| 836 | if(ODClient::getSingleton().isConnected()) |
| 837 | { |
| 838 | ClientNotification *clientNotification = new ClientNotification( |
| 839 | ClientNotificationType::editorCreateWorker); |
| 840 | clientNotification->mPacket << getModeManager().getInputManager().mSeatIdSelected; |
| 841 | ODClient::getSingleton().queueClientNotification(clientNotification); |
| 842 | } |
| 843 | break; |
| 844 | } |
| 845 | case GuiAction::ButtonPressedCreatureFighter: |
| 846 | { |
| 847 | if(ODClient::getSingleton().isConnected()) |
| 848 | { |
| 849 | const CreatureDefinition* def = mGameMap->getClassDescription(mCurrentCreatureIndex); |
| 850 | if(def == nullptr) |
| 851 | { |
| 852 | OD_LOG_ERR("unexpected null CreatureDefinition mCurrentCreatureIndex=" + Helper::toString(mCurrentCreatureIndex)); |
| 853 | break; |
| 854 | } |
| 855 | ClientNotification *clientNotification = new ClientNotification( |
| 856 | ClientNotificationType::editorCreateFighter); |
| 857 | clientNotification->mPacket << getModeManager().getInputManager().mSeatIdSelected; |
| 858 | clientNotification->mPacket << def->getClassName(); |
| 859 | ODClient::getSingleton().queueClientNotification(clientNotification); |
| 860 | } |
| 861 | break; |
| 862 | } |
| 863 | case GuiAction::ButtonPressedMapLight: |
| 864 | { |
| 865 | if(ODClient::getSingleton().isConnected()) |
| 866 | { |
| 867 | ClientNotification *clientNotification = new ClientNotification( |
| 868 | ClientNotificationType::editorAskCreateMapLight); |
| 869 | ODClient::getSingleton().queueClientNotification(clientNotification); |
| 870 | } |
| 871 | break; |
| 872 | } |
| 873 | default: |
| 874 | break; |
| 875 | } |
| 876 | } |
| 877 | |
| 878 | bool EditorMode::toggleOptionsWindow(const CEGUI::EventArgs& /*arg*/) |
| 879 | { |
nothing calls this directly
no test coverage detected