SuperTuxKart
select_challenge.hpp
1 // SuperTuxKart - a fun racing game with go-kart
2 // Copyright (C) 2012-2015 Marianne Gagnon
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 #ifndef SELECT_CHALLENGE_HPP
19 #define SELECT_CHALLENGE_HPP
20 
21 #include "challenges/challenge_status.hpp"
22 #include "guiengine/event_handler.hpp"
23 #include "guiengine/modaldialog.hpp"
24 #include "race/race_manager.hpp"
25 
31 {
32 private:
33  bool m_self_destroy = false;
34  std::string m_challenge_id;
35  void updateSolvedIcon(const ChallengeStatus* c, RaceManager::Difficulty diff,
36  const char* widget_name, const char* path);
37 public:
38 
39  SelectChallengeDialog(const float percentWidth, const float percentHeight,
40  std::string challenge_id);
41  virtual ~SelectChallengeDialog();
42 
43  virtual GUIEngine::EventPropagation processEvent(const std::string& eventSource);
44  virtual void onUpdate(float dt);
45 };
46 
47 #endif
48 
Difficulty
Game difficulty.
Definition: race_manager.hpp:224
virtual void onUpdate(float dt)
Override to be notified of updates.
Definition: select_challenge.cpp:224
Dialog shown when starting a challenge.
Definition: select_challenge.hpp:30
virtual GUIEngine::EventPropagation processEvent(const std::string &eventSource)
Returns whether to block event propagation (usually, you will want to block events you processed)
Definition: select_challenge.cpp:236
The state of a challenge for one player.
Definition: challenge_status.hpp:52
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:55