forked from mirror/openmw-tes3mp
[Server] Implement PasswordDialog
This commit is contained in:
parent
b84f97ec2b
commit
568b0702fa
2 changed files with 16 additions and 1 deletions
|
@ -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…
Reference in a new issue