~ubuntu-branches/ubuntu/raring/lordsawar/raring

« back to all changes in this revision

Viewing changes to src/editor/reward-dialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese, Gonéri Le Bouder
  • Date: 2008-06-17 11:15:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617111526-yjyvu9df50zmpdo0
Tags: 0.0.9-1
[ Barry deFreese ]
* New upstream release.
  + Fixes gcc-4.3 builds so drop ftbfs_gcc-4.3_fix.diff.
  + Add new build-dependency for libgnet-dev.
* Add simple man page for new lordsawar-tile-editor.
* Add desktop file for lordsawar-tile-editor.
* Remove French translation on install.

[ Gonéri Le Bouder ]
* bump Debian Policy to 3.8.0. No change needed.
* fix wording in the 0.0.8-3 entry of the Debian changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  Copyright (C) 2008, 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 2 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
#ifndef REWARD_DIALOG_H
 
19
#define REWARD_DIALOG_H
 
20
 
 
21
#include <memory>
 
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>
 
27
 
 
28
class Reward;
 
29
class Item;
 
30
class Army;
 
31
class Ruin;
 
32
class Player;
 
33
 
 
34
//! Scenario editor.  Edits rewards.
 
35
class RewardDialog: public sigc::trackable
 
36
{
 
37
 public:
 
38
    RewardDialog(Player *player, bool hidden_ruins, Reward *r);
 
39
 
 
40
    void set_parent_window(Gtk::Window &parent);
 
41
 
 
42
    void run();
 
43
 
 
44
    Reward *get_reward() {return reward;}
 
45
    
 
46
 private:
 
47
    std::auto_ptr<Gtk::Dialog> dialog;
 
48
    Player *d_player;
 
49
    Reward *reward;
 
50
    Item *item;
 
51
    Army *ally;
 
52
    Ruin *hidden_ruin;
 
53
    bool d_hidden_ruins;
 
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;
 
76
 
 
77
    Gtk::HBox *gold_hbox;
 
78
    Gtk::HBox *item_hbox;
 
79
    Gtk::HBox *allies_hbox;
 
80
    Gtk::HBox *map_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();
 
91
    void set_item_name();
 
92
    void on_ally_clicked();
 
93
    void on_randomize_allies_clicked();
 
94
    void on_clear_ally_clicked();
 
95
    void set_ally_name();
 
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();
 
101
 
 
102
    void fill_in_reward_info();
 
103
 
 
104
};
 
105
 
 
106
#endif