You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwmp/GUIController.hpp

84 lines
2.2 KiB
C++

#ifndef OPENMW_GUICONTROLLER_HPP
#define OPENMW_GUICONTROLLER_HPP
#include <components/settings/settings.hpp>
#include "apps/openmw/mwgui/mode.hpp"
#include <components/openmw-mp/Base/BasePlayer.hpp>
#include "GUI/PlayerMarkerCollection.hpp"
#include "GUI/TextInputDialog.hpp"
namespace MWGui
{
class LocalMapBase;
class MapWindow;
}
namespace mwmp
{
class GUIDialogList;
class GUIChat;
class GUIController
{
public:
enum GM
{
GM_VR_MetaMenu = MWGui::GM_QuickKeysMenu + 1, // Put this dummy GuiMode here because it's used in VR
GM_TES3MP_InputBox,
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);
/// Returns 0 if there was no events
bool pressedKey(int key);
void changeChatMode();
bool getChatEditState();
void update(float dt);
void processCustomMessageBoxInput(int pressedButton);
void WM_UpdateVisible(MWGui::GuiMode mode);
void updatePlayersMarkers(MWGui::LocalMapBase *localMapBase);
void updateGlobalMapMarkerTooltips(MWGui::MapWindow *pWindow);
ESM::CustomMarker createMarker(const RakNet::RakNetGUID &guid);
PlayerMarkerCollection mPlayerMarkers;
private:
void setGlobalMapMarkerTooltip(MWGui::MapWindow *mapWindow ,MyGUI::Widget* markerWidget, int x, int y);
private:
GUIChat *mChat;
int keySay;
int keyChatMode;
long id;
TextInputDialog *mInputBox;
GUIDialogList *mListBox;
void onInputBoxDone(MWGui::WindowBase* parWindow);
//MyGUI::Widget *oldFocusWidget, *currentFocusWidget;
};
}
#endif //OPENMW_GUICONTROLLER_HPP