1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 11:23:50 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorGUIMessageBox.hpp

51 lines
1.6 KiB
C++
Raw Normal View History

2017-04-16 07:00:25 +00:00
//
// Created by koncord on 16.04.17.
//
#ifndef OPENMW_PROCESSORGUIMESSAGEBOX_HPP
#define OPENMW_PROCESSORGUIMESSAGEBOX_HPP
2017-06-06 16:06:10 +00:00
#include "../PlayerProcessor.hpp"
2017-04-16 07:00:25 +00:00
namespace mwmp
{
class ProcessorGUIMessageBox : public PlayerProcessor
{
public:
ProcessorGUIMessageBox()
{
BPP_INIT(ID_GUI_MESSAGEBOX)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "ID_GUI_MESSAGEBOX, Type %d, MSG %s", player->guiMessageBox.type,
player->guiMessageBox.label.c_str());
2017-06-06 15:33:23 +00:00
switch(player->guiMessageBox.type)
{
case BasePlayer::GUIMessageBox::MessageBox:
Main::get().getGUIController()->showMessageBox(player->guiMessageBox);
break;
case BasePlayer::GUIMessageBox::CustomMessageBox:
Main::get().getGUIController()->showCustomMessageBox(player->guiMessageBox);
break;
case BasePlayer::GUIMessageBox::InputDialog:
case BasePlayer::GUIMessageBox::PasswordDialog:
Main::get().getGUIController()->showInputBox(player->guiMessageBox);
break;
case BasePlayer::GUIMessageBox::ListBox:
Main::get().getGUIController()->showDialogList(player->guiMessageBox);
break;
}
2017-04-16 07:00:25 +00:00
}
}
};
}
#endif //OPENMW_PROCESSORGUIMESSAGEBOX_HPP