SuperTuxKart
Loading...
Searching...
No Matches
player_name_spinner.hpp
1// SuperTuxKart - a fun racing game with go-kart
2//
3// Copyright (C) 2006-2015 SuperTuxKart-Team
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 3
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19#ifndef PLAYER_NAME_SPINNER_HPP
20#define PLAYER_NAME_SPINNER_HPP
21
22#include "guiengine/widgets/spinner_widget.hpp"
23#include <IGUIImage.h>
24
26
27namespace GUIEngine
28{
32 {
33 int m_player_id;
34 bool m_incorrect;
35 irr::gui::IGUIImage* m_red_mark_widget;
36 KartSelectionScreen* m_parent;
37 //virtual EventPropagation focused(const int m_playerID) ;
38
39 public:
40 PlayerNameSpinner(KartSelectionScreen* parent, const int playerID);
41 // ------------------------------------------------------------------------
42 void setID(const int m_playerID);
43
44 // ------------------------------------------------------------------------
46 void markAsIncorrect();
47 // ------------------------------------------------------------------------
49 void markAsCorrect();
50 };
51}
52
53#endif
54
A small extension to the spinner widget to add features like player ID management or badging.
Definition: player_name_spinner.hpp:32
void markAsCorrect()
Remove any red mark set with 'markAsIncorrect'.
Definition: player_name_spinner.cpp:68
void markAsIncorrect()
Add a red mark on the spinner to mean "invalid choice".
Definition: player_name_spinner.cpp:45
A spinner or gauge widget (to select numbers / percentages).
Definition: spinner_widget.hpp:41
screen where players can choose their kart
Definition: kart_selection.hpp:51
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33