2016-07-23 14:02:06 +00:00
|
|
|
#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
|
|
|
|
2016-07-23 14:02:06 +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;
|
|
|
|
}
|
2016-07-23 14:02:06 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2016-11-03 16:21:41 +00:00
|
|
|
class GUIDialogList;
|
|
|
|
class GUIChat;
|
2016-07-23 14:02:06 +00:00
|
|
|
class GUIController
|
|
|
|
{
|
|
|
|
public:
|
2016-11-03 16:21:41 +00:00
|
|
|
enum GM
|
|
|
|
{
|
|
|
|
GM_TES3MP_InputBox = MWGui::GM_QuickKeysMenu + 1,
|
|
|
|
GM_TES3MP_ListBox
|
|
|
|
|
|
|
|
};
|
2016-07-23 14:02:06 +00:00
|
|
|
GUIController();
|
|
|
|
~GUIController();
|
2016-11-15 19:54:06 +00:00
|
|
|
void cleanUp();
|
2018-01-25 22:45:39 +00:00
|
|
|
|
|
|
|
void refreshGuiMode(MWGui::GuiMode guiMode);
|
|
|
|
|
2019-08-28 03:37:33 +00:00
|
|
|
void setupChat();
|
2016-07-23 14:02:06 +00:00
|
|
|
|
2016-11-15 19:54:06 +00:00
|
|
|
void printChatMessage(std::string &msg);
|
2016-07-23 14:02:06 +00:00
|
|
|
void setChatVisible(bool chatVisible);
|
|
|
|
|
2016-11-15 19:54:06 +00:00
|
|
|
void showMessageBox(const BasePlayer::GUIMessageBox &guiMessageBox);
|
|
|
|
void showCustomMessageBox(const BasePlayer::GUIMessageBox &guiMessageBox);
|
|
|
|
void showInputBox(const BasePlayer::GUIMessageBox &guiMessageBox);
|
2016-07-23 14:02:06 +00:00
|
|
|
|
2016-11-15 19:54:06 +00:00
|
|
|
void showDialogList(const BasePlayer::GUIMessageBox &guiMessageBox);
|
2016-11-03 16:21:41 +00:00
|
|
|
|
2020-05-10 22:54:07 +00:00
|
|
|
bool getChatEditState();
|
|
|
|
|
2016-07-23 14:02:06 +00:00
|
|
|
/// Returns 0 if there was no events
|
|
|
|
bool pressedKey(int key);
|
|
|
|
|
|
|
|
void update(float dt);
|
|
|
|
|
2020-07-17 23:36:13 +00:00
|
|
|
void processCustomMessageBoxInput(int pressedButton);
|
|
|
|
|
2016-08-27 05:40:11 +00:00
|
|
|
void WM_UpdateVisible(MWGui::GuiMode mode);
|
2016-10-07 05:17:19 +00:00
|
|
|
|
|
|
|
void updatePlayersMarkers(MWGui::LocalMapBase *localMapBase);
|
|
|
|
void updateGlobalMapMarkerTooltips(MWGui::MapWindow *pWindow);
|
|
|
|
|
2017-05-31 05:37:11 +00:00
|
|
|
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);
|
|
|
|
|
2016-07-23 14:02:06 +00:00
|
|
|
private:
|
|
|
|
GUIChat *mChat;
|
|
|
|
int keySay;
|
|
|
|
int keyChatMode;
|
|
|
|
|
|
|
|
long id;
|
2017-06-06 15:33:23 +00:00
|
|
|
TextInputDialog *mInputBox;
|
2016-11-03 16:21:41 +00:00
|
|
|
GUIDialogList *mListBox;
|
2016-11-15 19:54:06 +00:00
|
|
|
void onInputBoxDone(MWGui::WindowBase* parWindow);
|
2016-07-23 14:02:06 +00:00
|
|
|
//MyGUI::Widget *oldFocusWidget, *currentFocusWidget;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_GUICONTROLLER_HPP
|