SuperTuxKart
Loading...
Searching...
No Matches
change_password_dialog.hpp
1// SuperTuxKart - a fun racing game with go-kart
2// Copyright (C) 2013-2015 Glenn De Jonghe
3//
4// This program is free software; you can redistribute it and/or
5// modify it under the terms of the GNU General Public License
6// as published by the Free Software Foundation; either version 3
7// of the License, or (at your option) any later version.
8//
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 General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18
19#ifndef HEADER_CHANGE_PASSWORD_DIALOG_HPP
20#define HEADER_CHANGE_PASSWORD_DIALOG_HPP
21
22#include "guiengine/modaldialog.hpp"
23
24#include <irrString.h>
25
26namespace GUIEngine
27{
28 class IconButtonWidget;
29 class LabelWidget;
30 class RibbonWidget;
31}
32
38{
39
40public:
41
44
45 virtual void onEnterPressedInternal();
46
47 GUIEngine::EventPropagation processEvent(const std::string& eventSource);
48
49 virtual bool onEscapePressed();
50 virtual void onUpdate(float dt);
51 void success();
52 void error(const irr::core::stringw & error_message);
53 void changePassword(const irr::core::stringw &current_password,
54 const irr::core::stringw &new_password);
55
56private:
57
58 bool m_self_destroy;
59 bool m_show_success_dialog;
60 bool m_success;
61
62 GUIEngine::TextBoxWidget * m_current_password_widget;
63 GUIEngine::TextBoxWidget * m_new_password1_widget;
64 GUIEngine::TextBoxWidget * m_new_password2_widget;
65 GUIEngine::LabelWidget * m_info_widget;
66
67 GUIEngine::RibbonWidget * m_options_widget;
68 GUIEngine::IconButtonWidget * m_submit_widget;
69 GUIEngine::IconButtonWidget * m_cancel_widget;
70
71 void submit();
72};
73
74#endif
Dialog that allows a user to sign in.
Definition: change_password_dialog.hpp:38
GUIEngine::EventPropagation processEvent(const std::string &eventSource)
Returns whether to block event propagation (usually, you will want to block events you processed)
Definition: change_password_dialog.cpp:165
ChangePasswordDialog()
Creates a modal dialog with given percentage of screen width and height.
Definition: change_password_dialog.cpp:43
virtual void onUpdate(float dt)
Override to be notified of updates.
Definition: change_password_dialog.cpp:230
virtual bool onEscapePressed()
Override to change what happens on escape pressed.
Definition: change_password_dialog.cpp:201
void changePassword(const irr::core::stringw &current_password, const irr::core::stringw &new_password)
Create and submit the request to the server to change the password.
Definition: change_password_dialog.cpp:85
A button widget with an icon and optionnaly a label beneath.
Definition: icon_button_widget.hpp:44
A simple label widget.
Definition: label_widget.hpp:36
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:56
A static text/icons/tabs bar widget.
Definition: ribbon_widget.hpp:60
A text field widget.
Definition: text_box_widget.hpp:53
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33