SuperTuxKart
ghost_replay_info_dialog.hpp
1 //
2 // SuperTuxKart - a fun racing game with go-kart
3 // Copyright (C) 2016 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 HEADER_GHOST_REPLAY_INFO_DIALOG_HPP
20 #define HEADER_GHOST_REPLAY_INFO_DIALOG_HPP
21 
22 #include "guiengine/modaldialog.hpp"
23 #include "replay/replay_play.hpp"
24 
25 namespace GUIEngine
26 {
27  class BubbleWidget;
28  class CheckBoxWidget; class IconButtonWidget; class ListWidget;
29  class RibbonWidget;
30 }
31 
36 {
37 
38 private:
39 
40  bool m_self_destroy;
41 
42  bool m_record_race;
43  bool m_watch_only;
44  bool m_compare_ghost;
45 
46  unsigned int m_replay_id; // May be updated on list refreshes
47 
48  uint64_t m_compare_replay_uid;
49 
51 
52  GUIEngine::BubbleWidget* m_info_widget;
53  GUIEngine::RibbonWidget* m_action_widget;
54  GUIEngine::IconButtonWidget* m_back_widget;
55  GUIEngine::CheckBoxWidget* m_record_widget;
56  GUIEngine::CheckBoxWidget* m_watch_widget;
57  GUIEngine::CheckBoxWidget* m_compare_widget;
58 
59  GUIEngine::ListWidget* m_replay_info_widget;
60  GUIEngine::IconButtonWidget* m_track_screenshot_widget;
61 
62  void updateReplayDisplayedInfo();
63  void refreshMainScreen();
64 
65 public:
66  GhostReplayInfoDialog(unsigned int replay_id, uint64_t compare_replay_uid, bool compare_ghost);
68 
69  GUIEngine::EventPropagation processEvent(const std::string& eventSource);
70 
71  virtual bool onEscapePressed();
72  virtual void onUpdate(float dt);
73 }; // class GhostReplayInfoDialog
74 
75 #endif
A text widget that can expand when focused.
Definition: bubble_widget.hpp:36
A checkbox widget.
Definition: check_box_widget.hpp:34
A button widget with an icon and optionnaly a label beneath.
Definition: icon_button_widget.hpp:44
A vertical list widget with text entries.
Definition: list_widget.hpp:50
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:56
A static text/icons/tabs bar widget.
Definition: ribbon_widget.hpp:66
Dialog that allows a user to do action with ghost replay file.
Definition: ghost_replay_info_dialog.hpp:36
GUIEngine::EventPropagation processEvent(const std::string &eventSource)
Returns whether to block event propagation (usually, you will want to block events you processed)
Definition: ghost_replay_info_dialog.cpp:235
virtual void onUpdate(float dt)
Override to be notified of updates.
Definition: ghost_replay_info_dialog.cpp:376
virtual bool onEscapePressed()
Override to change what happens on escape pressed.
Definition: ghost_replay_info_dialog.cpp:368
Definition: replay_play.hpp:57
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33