/
campaign_settings.hpp
65 lines (46 loc) · 1.58 KB
/
campaign_settings.hpp
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
/*
Copyright (C) 2014 by Nathan Walker <nathan.b.walker@vanderbilt.edu>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
*/
#ifndef GUI_DIALOGS_CAMPAIGN_SETTINGS_HPP_INCLUDED
#define GUI_DIALOGS_CAMPAIGN_SETTINGS_HPP_INCLUDED
#include "gui/dialogs/dialog.hpp"
#include "addon/validation.hpp"
#include "addon/state.hpp"
#include "game_initialization/create_engine.hpp"
namespace gui2
{
class tcampaign_settings : public tdialog
{
public:
tcampaign_settings(ng::create_engine& eng);
// whether configure is enabled
bool enable_configure();
// whether connect is enabled
bool enable_connect();
private:
ng::create_engine& engine_;
// called on era change
// sets era via create_engine
void change_era(twindow& window);
// called on mod change
// sets mod via create_engine
void change_mod(size_t index, twindow& window);
// populate era and mod lists
void update_lists(twindow& window);
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
virtual const std::string& window_id() const;
/** Inherited from tdialog. */
void pre_show(CVideo& video, twindow& window);
/** Inherited from tdialog. */
void post_show(twindow& window);
};
} // end namespace gui2
#endif