1
// Copyright (C) 2008, Ben Asselstine
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 2 of the License, or
6
// (at your option) any later version.
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.
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
18
#ifndef REWARD_DIALOG_H
19
#define REWARD_DIALOG_H
22
#include <sigc++/trackable.h>
23
#include <gtkmm/dialog.h>
24
#include <gtkmm/entry.h>
25
#include <gtkmm/spinbutton.h>
26
#include <gtkmm/radiobutton.h>
34
//! Scenario editor. Edits rewards.
35
class RewardDialog: public sigc::trackable
38
RewardDialog(Player *player, bool hidden_ruins, Reward *r);
40
void set_parent_window(Gtk::Window &parent);
44
Reward *get_reward() {return reward;}
47
std::auto_ptr<Gtk::Dialog> dialog;
54
Gtk::RadioButton *gold_radiobutton;
55
Gtk::RadioButton *item_radiobutton;
56
Gtk::RadioButton *allies_radiobutton;
57
Gtk::RadioButton *map_radiobutton;
58
Gtk::RadioButton *hidden_ruin_radiobutton;
59
Gtk::SpinButton *gold_spinbutton;
60
Gtk::Button *randomize_gold_button;
61
Gtk::Button *item_button;
62
Gtk::Button *clear_item_button;
63
Gtk::Button *randomize_item_button;
64
Gtk::Button *ally_button;
65
Gtk::Button *clear_ally_button;
66
Gtk::Button *randomize_allies_button;
67
Gtk::SpinButton *num_allies_spinbutton;
68
Gtk::SpinButton *map_x_spinbutton;
69
Gtk::SpinButton *map_y_spinbutton;
70
Gtk::SpinButton *map_width_spinbutton;
71
Gtk::SpinButton *map_height_spinbutton;
72
Gtk::Button *randomize_map_button;
73
Gtk::Button *randomize_hidden_ruin_button;
74
Gtk::Button *clear_hidden_ruin_button;
75
Gtk::Button *hidden_ruin_button;
79
Gtk::HBox *allies_hbox;
81
Gtk::HBox *hidden_ruin_hbox;
82
void on_gold_toggled();
83
void on_item_toggled();
84
void on_allies_toggled();
85
void on_map_toggled();
86
void on_hidden_ruin_toggled();
87
void on_randomize_gold_clicked();
88
void on_item_clicked();
89
void on_clear_item_clicked();
90
void on_randomize_item_clicked();
92
void on_ally_clicked();
93
void on_randomize_allies_clicked();
94
void on_clear_ally_clicked();
96
void on_randomize_map_clicked();
97
void on_hidden_ruin_clicked();
98
void on_randomize_hidden_ruin_clicked();
99
void on_clear_hidden_ruin_clicked();
100
void set_hidden_ruin_name();
102
void fill_in_reward_info();