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