1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:49:56 +00:00
openmw-tes3mp/apps/openmw/mwmp/GUIController.hpp

81 lines
2.1 KiB
C++
Raw Normal View History

#ifndef OPENMW_GUICONTROLLER_HPP
#define OPENMW_GUICONTROLLER_HPP
#include <components/settings/settings.hpp>
2016-11-17 15:16:25 +00:00
2017-06-06 16:06:10 +00:00
#include "apps/openmw/mwgui/mode.hpp"
2016-11-17 15:16:25 +00:00
#include <components/openmw-mp/Base/BasePlayer.hpp>
2017-06-06 16:06:10 +00:00
#include "GUI/PlayerMarkerCollection.hpp"
#include "GUI/TextInputDialog.hpp"
2016-10-07 05:17:19 +00:00
namespace MWGui
{
class LocalMapBase;
class MapWindow;
}
namespace mwmp
{
class GUIDialogList;
class GUIChat;
class GUIController
{
public:
enum GM
{
GM_TES3MP_InputBox = MWGui::GM_QuickKeysMenu + 1,
GM_TES3MP_ListBox
};
GUIController();
~GUIController();
void cleanUp();
void refreshGuiMode(MWGui::GuiMode guiMode);
void setupChat();
void printChatMessage(std::string &msg);
void setChatVisible(bool chatVisible);
void showMessageBox(const BasePlayer::GUIMessageBox &guiMessageBox);
void showCustomMessageBox(const BasePlayer::GUIMessageBox &guiMessageBox);
void showInputBox(const BasePlayer::GUIMessageBox &guiMessageBox);
void showDialogList(const BasePlayer::GUIMessageBox &guiMessageBox);
bool getChatEditState();
/// Returns 0 if there was no events
bool pressedKey(int key);
void update(float dt);
void processCustomMessageBoxInput(int pressedButton);
void WM_UpdateVisible(MWGui::GuiMode mode);
2016-10-07 05:17:19 +00:00
void updatePlayersMarkers(MWGui::LocalMapBase *localMapBase);
void updateGlobalMapMarkerTooltips(MWGui::MapWindow *pWindow);
ESM::CustomMarker createMarker(const RakNet::RakNetGUID &guid);
2016-10-07 05:17:19 +00:00
PlayerMarkerCollection mPlayerMarkers;
private:
void setGlobalMapMarkerTooltip(MWGui::MapWindow *mapWindow ,MyGUI::Widget* markerWidget, int x, int y);
private:
GUIChat *mChat;
int keySay;
int keyChatMode;
long id;
2017-06-06 15:33:23 +00:00
TextInputDialog *mInputBox;
GUIDialogList *mListBox;
void onInputBoxDone(MWGui::WindowBase* parWindow);
//MyGUI::Widget *oldFocusWidget, *currentFocusWidget;
};
}
#endif //OPENMW_GUICONTROLLER_HPP