[Server] Implement PasswordDialog

0.6.1
Koncord 8 years ago
parent b84f97ec2b
commit 568b0702fa

@ -49,6 +49,19 @@ void GUIFunctions::InputDialog(unsigned short pid, int id, const char *label) no
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GUI_MESSAGEBOX)->Send(false);
}
void GUIFunctions::PasswordDialog(unsigned short pid, int id, const char *label) noexcept
{
Player *player;
GET_PLAYER(pid, player,);
player->guiMessageBox.id = id;
player->guiMessageBox.label = label;
player->guiMessageBox.type = Player::GUIMessageBox::PasswordDialog;
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GUI_MESSAGEBOX)->setPlayer(player);
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GUI_MESSAGEBOX)->Send(false);
}
void GUIFunctions::ListBox(unsigned short pid, int id, const char *label, const char *items)
{
Player *player;

@ -9,10 +9,11 @@
{"MessageBox", GUIFunctions::_MessageBox},\
{"CustomMessageBox", GUIFunctions::CustomMessageBox},\
{"InputDialog", GUIFunctions::InputDialog},\
{"PasswordDialog", GUIFunctions::PasswordDialog},\
{"ListBox", GUIFunctions::ListBox},\
{"SetMapVisibility", GUIFunctions::SetMapVisibility},\
{"SetMapVisibilityAll", GUIFunctions::SetMapVisibilityAll},\
{"SetConsoleAllow", GUIFunctions::SetConsoleAllow}\
{"SetConsoleAllow", GUIFunctions::SetConsoleAllow}\
class GUIFunctions
{
@ -22,6 +23,7 @@ public:
static void CustomMessageBox(unsigned short pid, int id, const char *label, const char *buttons) noexcept;
static void InputDialog(unsigned short pid, int id, const char *label) noexcept;
static void PasswordDialog(unsigned short pid, int id, const char *label) noexcept;
static void ListBox(unsigned short pid, int id, const char *label, const char *items);

Loading…
Cancel
Save