guiPasswordChange.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. Part of Minetest
  3. Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. Copyright (C) 2013 Ciaran Gultnieks <ciaran@ciarang.com>
  5. Permission to use, copy, modify, and distribute this software for any
  6. purpose with or without fee is hereby granted, provided that the above
  7. copyright notice and this permission notice appear in all copies.
  8. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef GUIPASSWORDCHANGE_HEADER
  17. #define GUIPASSWORDCHANGE_HEADER
  18. #include "irrlichttypes_extrabloated.h"
  19. #include "modalMenu.h"
  20. #include "client.h"
  21. #include <string>
  22. class GUIPasswordChange : public GUIModalMenu
  23. {
  24. public:
  25. GUIPasswordChange(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
  26. IMenuManager *menumgr, Client *client);
  27. ~GUIPasswordChange();
  28. void removeChildren();
  29. /*
  30. Remove and re-add (or reposition) stuff
  31. */
  32. void regenerateGui(v2u32 screensize);
  33. void drawMenu();
  34. void acceptInput();
  35. bool processInput();
  36. bool OnEvent(const SEvent &event);
  37. private:
  38. Client *m_client;
  39. std::wstring m_oldpass = L"";
  40. std::wstring m_newpass = L"";
  41. std::wstring m_newpass_confirm = L"";
  42. };
  43. #endif