diff --git a/apps/openmw-mp/Script/Functions/GUI.cpp b/apps/openmw-mp/Script/Functions/GUI.cpp index 62a778f08..26f54a50c 100644 --- a/apps/openmw-mp/Script/Functions/GUI.cpp +++ b/apps/openmw-mp/Script/Functions/GUI.cpp @@ -36,13 +36,14 @@ void GUIFunctions::CustomMessageBox(unsigned short pid, int id, const char *labe mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GUI_MESSAGEBOX)->Send(false); } -void GUIFunctions::InputDialog(unsigned short pid, int id, const char *label) noexcept +void GUIFunctions::InputDialog(unsigned short pid, int id, const char *label, const char *note) noexcept { Player *player; GET_PLAYER(pid, player,); player->guiMessageBox.id = id; player->guiMessageBox.label = label; + player->guiMessageBox.note = note; player->guiMessageBox.type = Player::GUIMessageBox::InputDialog; mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GUI_MESSAGEBOX)->setPlayer(player); diff --git a/apps/openmw-mp/Script/Functions/GUI.hpp b/apps/openmw-mp/Script/Functions/GUI.hpp index 7b0da7deb..d903085ff 100644 --- a/apps/openmw-mp/Script/Functions/GUI.hpp +++ b/apps/openmw-mp/Script/Functions/GUI.hpp @@ -63,9 +63,10 @@ public: * \param pid The player ID for whom the input dialog should appear. * \param id The numerical ID of the input dialog. * \param label The text at the top of the input dialog. + * \parm note The text at the bottom of the input dialog. * \return void */ - static void InputDialog(unsigned short pid, int id, const char *label) noexcept; + static void InputDialog(unsigned short pid, int id, const char *label, const char *note) noexcept; /** * \brief Display a password dialog at the center of the screen. diff --git a/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp b/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp index 2283da3a1..3f15cfe21 100644 --- a/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp +++ b/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 23.07.16. -// - #include "PacketGUIBoxes.hpp" #include @@ -25,7 +21,8 @@ void PacketGUIBoxes::Packet(RakNet::BitStream *bs, bool send) if (player->guiMessageBox.type == BasePlayer::GUIMessageBox::CustomMessageBox) RW(player->guiMessageBox.buttons, send); - else if (player->guiMessageBox.type == BasePlayer::GUIMessageBox::PasswordDialog) + else if (player->guiMessageBox.type == BasePlayer::GUIMessageBox::InputDialog || + player->guiMessageBox.type == BasePlayer::GUIMessageBox::PasswordDialog) RW(player->guiMessageBox.note, send); }