forked from springlobby/springlobby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
singleplayertab.h
107 lines (85 loc) · 2.76 KB
/
singleplayertab.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#ifndef SPRINGLOBBY_HEADERGUARD_SINGLEPLAYERTAB_H
#define SPRINGLOBBY_HEADERGUARD_SINGLEPLAYERTAB_H
#include <wx/scrolwin.h>
#include "singleplayerbattle.h"
class Ui;
class MapCtrl;
class SinglePlayerBattle;
class wxWindow;
class wxButton;
class wxStaticLine;
class wxChoice;
class wxStaticText;
class wxCommandEvent;
class wxCheckBox;
class wxMouseEvent;
class ColorButton;
class SinglePlayerTab: public wxScrolledWindow , public UnitsyncReloadedSink< SinglePlayerTab >
{
public:
SinglePlayerTab( wxWindow* parent, MainSinglePlayerTab& msptab );
~SinglePlayerTab();
void UpdateMinimap();
void ReloadMaplist();
void ReloadModlist();
void UpdateTag( const wxString& Tag );
void UpdatePresetList();
SinglePlayerBattle& GetBattle() { return m_battle; }
bool ValidSetup() const;
void OnMapSelect( wxCommandEvent& event );
void OnModSelect( wxCommandEvent& event );
void OnMapBrowse( wxCommandEvent& event );
void OnAddBot( wxCommandEvent& event );
void OnStart( wxCommandEvent& event );
void OnRandomCheck( wxCommandEvent& event );
void OnSpectatorCheck( wxCommandEvent& event );
void OnColorButton( wxCommandEvent& event );
void OnReset( wxCommandEvent& event );
void OnMouseWheel( wxMouseEvent& event );
void OnUnitsyncReloaded( GlobalEvents::GlobalEventData /*data*/ );
void ResetUsername();
void SetMap( unsigned int index );
void SetMod( unsigned int index );
protected:
SinglePlayerBattle m_battle;
MapCtrl* m_minimap;
wxChoice* m_map_pick;
wxChoice* m_mod_pick;
wxStaticText* m_map_lbl;
wxStaticText* m_mod_lbl;
wxButton* m_select_btn;
wxButton* m_addbot_btn;
wxStaticLine* m_buttons_sep;
wxButton* m_reset_btn;
wxCheckBox* m_random_check;
wxCheckBox* m_spectator_check;
wxButton* m_start_btn;
ColorButton* m_color_btn;
enum
{
SP_MAP_PICK = wxID_HIGHEST,
SP_MOD_PICK,
SP_BROWSE_MAP,
SP_ADD_BOT,
SP_RESET,
SP_START,
SP_RANDOM,
SP_SPECTATE,
SP_COLOUR
};
DECLARE_EVENT_TABLE()
};
#endif // SPRINGLOBBY_HEADERGUARD_SINGLEPLAYERTAB_H
/**
This file is part of SpringLobby,
Copyright (C) 2007-2011
SpringLobby is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.
SpringLobby is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SpringLobby. If not, see <http://www.gnu.org/licenses/>.
**/