1 //  Copyright (C) 2007, 2008, 2009, 2014, 2017 Ben Asselstine
2 //
3 //  This program is free software; you can redistribute it and/or modify
4 //  it under the terms of the GNU General Public License as published by
5 //  the Free Software Foundation; either version 3 of the License, or
6 //  (at your option) any later version.
7 //
8 //  This program is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 //  GNU Library General Public License for more details.
12 //
13 //  You should have received a copy of the GNU General Public License
14 //  along with this program; if not, write to the Free Software
15 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 //  02110-1301, USA.
17 
18 #pragma once
19 #ifndef GAME_OPTIONS_DIALOG_H
20 #define GAME_OPTIONS_DIALOG_H
21 
22 #include <gtkmm.h>
23 #include <sigc++/signal.h>
24 
25 #include "game-parameters.h"
26 #include "lw-dialog.h"
27 
28 // dialog for setting game options before the game starts
29 class GameOptionsDialog: public LwDialog
30 {
31  public:
32     GameOptionsDialog(Gtk::Window &parent, bool readonly);
33     ~GameOptionsDialog();
34 
35     bool run();
hide()36     void hide() {dialog->hide();};
37 
38     sigc::signal<void> difficulty_option_changed;
39 
40  private:
41     Gtk::Grid *difficultoptionstable;
42     Gtk::Grid *notdifficultoptionstable;
43     Gtk::ComboBox *quests_combobox;
44     Gtk::Switch *view_enemies_switch;
45     Gtk::Switch *view_production_switch;
46     Gtk::Switch *hidden_map_switch;
47     Gtk::ComboBox *neutral_cities_combobox;
48     Gtk::ComboBox *razing_cities_combobox;
49     Gtk::Switch *diplomacy_switch;
50     Gtk::Switch *intense_combat_switch;
51     Gtk::Switch *military_advisor_switch;
52     Gtk::Switch *random_turns_switch;
53     Gtk::ComboBox *quick_start_combobox;
54     Gtk::Switch *cusp_of_war_switch;
55     Gtk::ComboBox *vectoring_combobox;
56     Gtk::ComboBox *build_production_combobox;
57     Gtk::ComboBox *sack_combobox;
58     Gtk::Notebook *notebook;
59     void fill_in_options();
60     void on_view_enemies_switch_clicked();
61     void on_view_production_switch_clicked();
62     void on_quests_combobox_changed();
63     void on_hidden_map_switch_clicked();
64     void on_neutral_cities_combobox_changed();
65     void on_razing_cities_combobox_changed();
66     void on_diplomacy_switch_clicked();
67     void on_cusp_of_war_switch_clicked();
68     void on_random_turns_switch_clicked();
69     void on_quick_start_combobox_changed();
70     void on_vectoring_combobox_changed();
71     void on_build_production_combobox_changed();
72     void on_sacking_combobox_changed();
73     void on_intense_combat_switch_clicked();
74     void on_military_advisor_switch_clicked();
75     bool d_readonly;
76 };
77 
78 #endif
79