guiConfirmRegistration.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. Minetest
  3. Copyright (C) 2018 srifqi, Muhammad Rifqi Priyo Susanto
  4. <muhammadrifqipriyosusanto@gmail.com>
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU Lesser General Public License as published by
  7. the Free Software Foundation; either version 2.1 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public License along
  14. with this program; if not, write to the Free Software Foundation, Inc.,
  15. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  16. */
  17. #pragma once
  18. #include "irrlichttypes_extrabloated.h"
  19. #include "modalMenu.h"
  20. #include <string>
  21. class Client;
  22. class GUIConfirmRegistration : public GUIModalMenu
  23. {
  24. public:
  25. GUIConfirmRegistration(gui::IGUIEnvironment *env, gui::IGUIElement *parent,
  26. s32 id, IMenuManager *menumgr, Client *client,
  27. const std::string &playername, const std::string &password,
  28. bool *aborted);
  29. ~GUIConfirmRegistration();
  30. void removeChildren();
  31. /*
  32. Remove and re-add (or reposition) stuff
  33. */
  34. void regenerateGui(v2u32 screensize);
  35. void drawMenu();
  36. void closeMenu(bool goNext);
  37. void acceptInput();
  38. bool processInput();
  39. bool OnEvent(const SEvent &event);
  40. #ifdef __ANDROID__
  41. bool getAndroidUIInput();
  42. #endif
  43. private:
  44. std::wstring getLabelByID(s32 id) { return L""; }
  45. std::string getNameByID(s32 id) { return "password"; }
  46. Client *m_client = nullptr;
  47. const std::string &m_playername;
  48. const std::string &m_password;
  49. bool *m_aborted = nullptr;
  50. std::wstring m_pass_confirm = L"";
  51. };