SuperTuxKart
Loading...
Searching...
No Matches
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 "guiengine/widgets.hpp"
24#include "replay/replay_play.hpp"
25
30{
31
32private:
33
34 bool m_self_destroy;
35
36 bool m_record_race;
37 bool m_watch_only;
38 bool m_compare_ghost;
39
40 unsigned int m_replay_id; // May be updated on list refreshes
41
42 uint64_t m_compare_replay_uid;
43
45
46 GUIEngine::RibbonWidget* m_action_widget;
47 GUIEngine::IconButtonWidget* m_back_widget;
48 GUIEngine::CheckBoxWidget* m_record_widget;
49 GUIEngine::CheckBoxWidget* m_watch_widget;
50 GUIEngine::CheckBoxWidget* m_compare_widget;
51
52 GUIEngine::ListWidget* m_replay_info_widget;
53 GUIEngine::IconButtonWidget* m_track_screenshot_widget;
54
55 void updateReplayDisplayedInfo();
56 void refreshMainScreen();
57
58public:
59 GhostReplayInfoDialog(unsigned int replay_id, uint64_t compare_replay_uid, bool compare_ghost);
61
62 GUIEngine::EventPropagation processEvent(const std::string& eventSource);
63
64 virtual bool onEscapePressed();
65 virtual void onUpdate(float dt);
66}; // class GhostReplayInfoDialog
67
68#endif
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:60
Dialog that allows a user to do action with ghost replay file.
Definition: ghost_replay_info_dialog.hpp:30
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:223
virtual void onUpdate(float dt)
Override to be notified of updates.
Definition: ghost_replay_info_dialog.cpp:358
virtual bool onEscapePressed()
Override to change what happens on escape pressed.
Definition: ghost_replay_info_dialog.cpp:350
Definition: replay_play.hpp:57