~ubuntu-branches/ubuntu/natty/balder2d/natty

« back to all changes in this revision

Viewing changes to debian/patches/10_guichan_and_boost.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Bjørn Hansen
  • Date: 2008-06-15 17:15:38 UTC
  • mfrom: (1.1.1 upstream) (3.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080615171538-e407e07wbtdy0qs8
Tags: 1.0-1
* new upstream release
* update for guichan 8.1 (Closes: #482584)
* use physicsfs to make data/config/map/aiscript loading more flexible
* new skins for menus
* fix typo in control file long description (Closes: #458401)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 10_guichan_and_boost.dpatch by  <bjorn@localhost>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: No description.
6
 
 
7
 
@DPATCH@
8
 
diff -urNad balder2d-1.0~rc1~/SConstruct balder2d-1.0~rc1/SConstruct
9
 
--- balder2d-1.0~rc1~/SConstruct        2006-10-15 23:42:21.000000000 -0700
10
 
+++ balder2d-1.0~rc1/SConstruct 2007-07-11 09:33:14.000000000 -0700
11
 
@@ -11,7 +11,7 @@
12
 
 
13
 
 import glob
14
 
 files = glob.glob("src/*.cpp") + glob.glob("src/*/*.cpp") + glob.glob("src/*/*.c")
15
 
-libs = Split('guichan_sdl guichan SDL_image SDL_mixer SDL_gfx python2.4 boost_filesystem')
16
 
+libs = Split('guichan_sdl guichan SDL_image SDL_mixer SDL_gfx python2.4 boost_filesystem-mt')
17
 
 
18
 
 env.ParseConfig('sdl-config --cflags --libs')
19
 
 env.Program('bin/balder2d',files, LIBS=libs)
20
 
diff -urNad balder2d-1.0~rc1~/include/menu/gamesetup.h balder2d-1.0~rc1/include/menu/gamesetup.h
21
 
--- balder2d-1.0~rc1~/include/menu/gamesetup.h  2006-10-15 23:42:21.000000000 -0700
22
 
+++ balder2d-1.0~rc1/include/menu/gamesetup.h   2007-07-11 09:33:14.000000000 -0700
23
 
@@ -33,7 +33,7 @@
24
 
     public:
25
 
         GameSetupMenu(gcn::Container* top, SubMenu* parent);
26
 
         virtual ~GameSetupMenu();
27
 
-        void action(const std::string& action);
28
 
+        void action(const gcn::ActionEvent& action);
29
 
     private:
30
 
         gcn::Button* backButton;
31
 
         SampleMapWidget* sampleMap;
32
 
diff -urNad balder2d-1.0~rc1~/include/menu/mainmenu.h balder2d-1.0~rc1/include/menu/mainmenu.h
33
 
--- balder2d-1.0~rc1~/include/menu/mainmenu.h   2006-10-15 23:42:21.000000000 -0700
34
 
+++ balder2d-1.0~rc1/include/menu/mainmenu.h    2007-07-11 09:33:14.000000000 -0700
35
 
@@ -32,7 +32,7 @@
36
 
   public:
37
 
     MainMenu(gcn::Container* top, Menu* menusystem);
38
 
     virtual ~MainMenu();
39
 
-    void action(const std::string& action);
40
 
+    void action(const gcn::ActionEvent& action);
41
 
   private:
42
 
     Menu* system;
43
 
     SubMenu* optionsMenu;
44
 
diff -urNad balder2d-1.0~rc1~/include/menu/menu.h balder2d-1.0~rc1/include/menu/menu.h
45
 
--- balder2d-1.0~rc1~/include/menu/menu.h       2006-10-15 23:42:21.000000000 -0700
46
 
+++ balder2d-1.0~rc1/include/menu/menu.h        2007-07-11 09:33:14.000000000 -0700
47
 
@@ -35,7 +35,7 @@
48
 
   public:
49
 
     Menu(SoundManager *);
50
 
     virtual ~Menu();
51
 
-    void action(const std::string& action);
52
 
+     void action(const gcn::ActionEvent& action);
53
 
     bool Run();
54
 
     static SDLKey lastKeyPressed; // ugly hack for keybinding
55
 
   private:
56
 
diff -urNad balder2d-1.0~rc1~/include/menu/numberfield.h balder2d-1.0~rc1/include/menu/numberfield.h
57
 
--- balder2d-1.0~rc1~/include/menu/numberfield.h        2006-10-15 23:42:21.000000000 -0700
58
 
+++ balder2d-1.0~rc1/include/menu/numberfield.h 2007-07-11 09:33:14.000000000 -0700
59
 
@@ -25,7 +25,7 @@
60
 
 {
61
 
 public:
62
 
     NumberField(int n, int maxDigits = 3);
63
 
-    virtual void mousePress(int x, int y, int button);
64
 
+    virtual void mousePressed(gcn::MouseEvent &e);
65
 
     virtual void keyPress (const gcn::Key &key);
66
 
     virtual void draw(gcn::Graphics*);
67
 
     int getValue();
68
 
diff -urNad balder2d-1.0~rc1~/include/menu/options.h balder2d-1.0~rc1/include/menu/options.h
69
 
--- balder2d-1.0~rc1~/include/menu/options.h    2006-10-15 23:42:21.000000000 -0700
70
 
+++ balder2d-1.0~rc1/include/menu/options.h     2007-07-11 09:33:14.000000000 -0700
71
 
@@ -31,7 +31,7 @@
72
 
   public:
73
 
     OptionsMenu(gcn::Container* top, SubMenu* parent);
74
 
     virtual ~OptionsMenu();
75
 
-    void action(const std::string& action);
76
 
+    void action(const gcn::ActionEvent& action);
77
 
   private:
78
 
     SubMenu* gameSetupMenu;
79
 
     SubMenu* playerSetupMenu;
80
 
diff -urNad balder2d-1.0~rc1~/include/menu/playersetup.h balder2d-1.0~rc1/include/menu/playersetup.h
81
 
--- balder2d-1.0~rc1~/include/menu/playersetup.h        2006-10-15 23:42:21.000000000 -0700
82
 
+++ balder2d-1.0~rc1/include/menu/playersetup.h 2007-07-11 09:33:14.000000000 -0700
83
 
@@ -34,7 +34,7 @@
84
 
     public:
85
 
         PlayerSetupMenu(gcn::Container* top, SubMenu* parent);
86
 
         virtual ~PlayerSetupMenu();
87
 
-        void action(const std::string& action);
88
 
+        void action(const gcn::ActionEvent& action);
89
 
         void BindKey(const gcn::Key& key);
90
 
     private:
91
 
         void RefreshKeys();
92
 
diff -urNad balder2d-1.0~rc1~/include/menu/soundvideo.h balder2d-1.0~rc1/include/menu/soundvideo.h
93
 
--- balder2d-1.0~rc1~/include/menu/soundvideo.h 2006-10-15 23:42:21.000000000 -0700
94
 
+++ balder2d-1.0~rc1/include/menu/soundvideo.h  2007-07-11 09:33:14.000000000 -0700
95
 
@@ -31,7 +31,7 @@
96
 
     public:
97
 
         SoundVideoMenu(gcn::Container* top, SubMenu* parent);
98
 
         virtual ~SoundVideoMenu();
99
 
-        void action(const std::string& action);
100
 
+        void action(const gcn::ActionEvent& action);
101
 
     private:
102
 
         gcn::Button* backButton;
103
 
         gcn::CheckBox* fullScreenCheckbox;
104
 
diff -urNad balder2d-1.0~rc1~/src/menu/gamesetup.cpp balder2d-1.0~rc1/src/menu/gamesetup.cpp
105
 
--- balder2d-1.0~rc1~/src/menu/gamesetup.cpp    2006-10-15 23:42:21.000000000 -0700
106
 
+++ balder2d-1.0~rc1/src/menu/gamesetup.cpp     2007-07-11 09:33:14.000000000 -0700
107
 
@@ -31,7 +31,7 @@
108
 
     page->setPosition(150,200);
109
 
 
110
 
     backButton = new gcn::Button("Back");
111
 
-    backButton->setEventId("back");
112
 
+    backButton->setActionEventId("back");
113
 
     backButton->addActionListener(this);
114
 
 
115
 
     sampleMap = new SampleMapWidget(ConfigManager::GetMap(), 0, 0, 100, 80);
116
 
@@ -41,7 +41,7 @@
117
 
     mapScrollArea = new gcn::ScrollArea();
118
 
     mapListBox = new gcn::ListBox();
119
 
     mapListBox->setWidth(400 - mapnameLabel->getWidth());
120
 
-    mapListBox->setEventId("selectNewMap");
121
 
+    mapListBox->setActionEventId("selectNewMap");
122
 
     mapListBox->addActionListener(this);
123
 
     mapDropDown = new gcn::DropDown(maplistModel, mapScrollArea, mapListBox);
124
 
     mapDropDown->setWidth(mapListBox->getWidth()+20);
125
 
@@ -51,13 +51,13 @@
126
 
     int time = ConfigManager::GetIntValue("GameSetup", "TimeLimit");
127
 
     int life = ConfigManager::GetIntValue("GameSetup", "LifeLimit");
128
 
     scoreLimitSelector = new gcn::CheckBox("Maximum Score", score > 0);
129
 
-    scoreLimitSelector->setEventId("toggleScoreLimit");
130
 
+    scoreLimitSelector->setActionEventId("toggleScoreLimit");
131
 
     scoreLimitSelector->addActionListener(this);
132
 
     timeLimitSelector = new gcn::CheckBox("Time (minutes)", time > 0);
133
 
-    timeLimitSelector->setEventId("toggleTimeLimit");
134
 
+    timeLimitSelector->setActionEventId("toggleTimeLimit");
135
 
     timeLimitSelector->addActionListener(this);
136
 
     lifeLimitSelector = new gcn::CheckBox("Limited Lives", life > 0);
137
 
-    lifeLimitSelector->setEventId("toggleLifeLimit");
138
 
+    lifeLimitSelector->setActionEventId("toggleLifeLimit");
139
 
     lifeLimitSelector->addActionListener(this);
140
 
     scoreLimitValue = new NumberField(score);
141
 
     scoreLimitValue->setEnabled(score > 0);
142
 
@@ -83,14 +83,14 @@
143
 
 GameSetupMenu::~GameSetupMenu()
144
 
 {}
145
 
 
146
 
-void GameSetupMenu::action(const std::string& action)
147
 
+void GameSetupMenu::action(const gcn::ActionEvent& action)
148
 
 {
149
 
-    if (action == "selectNewMap")
150
 
+    if (action.getId() == "selectNewMap")
151
 
     {
152
 
         ConfigManager::SetMap(maplistModel->getElementAt(mapListBox->getSelected()).c_str());
153
 
         sampleMap->setSampleMap(ConfigManager::GetMap());
154
 
     }
155
 
-    else if (action == "toggleScoreLimit")
156
 
+    else if (action.getId() == "toggleScoreLimit")
157
 
     {
158
 
         int score = scoreLimitValue->getValue()*-1;
159
 
         if (0 == score) score = -10;
160
 
@@ -100,7 +100,7 @@
161
 
         scoreLimitValue->setVisible(score > 0);
162
 
         ConfigManager::SetIntValue("GameSetup", "ScoreLimit", scoreLimitValue->getValue());
163
 
     }
164
 
-    else if (action == "toggleTimeLimit")
165
 
+    else if (action.getId() == "toggleTimeLimit")
166
 
     {
167
 
         int time = timeLimitValue->getValue()*-1;
168
 
         if (0 == time) time = 10;
169
 
@@ -110,7 +110,7 @@
170
 
         timeLimitValue->setVisible(time > 0);
171
 
         ConfigManager::SetIntValue("GameSetup", "TimeLimit", timeLimitValue->getValue());
172
 
     }
173
 
-    else if (action == "toggleLifeLimit")
174
 
+    else if (action.getId() == "toggleLifeLimit")
175
 
     {
176
 
         int life = lifeLimitValue->getValue()*-1;
177
 
         if (0 == life) life = -10;
178
 
@@ -120,7 +120,7 @@
179
 
         lifeLimitValue->setVisible(life > 0);
180
 
         ConfigManager::SetIntValue("GameSetup", "LifeLimit", lifeLimitValue->getValue());
181
 
     }
182
 
-    else if (action == "back")
183
 
+    else if (action.getId() == "back")
184
 
     {
185
 
         hide();
186
 
         parent->show();
187
 
diff -urNad balder2d-1.0~rc1~/src/menu/mainmenu.cpp balder2d-1.0~rc1/src/menu/mainmenu.cpp
188
 
--- balder2d-1.0~rc1~/src/menu/mainmenu.cpp     2006-10-15 23:42:21.000000000 -0700
189
 
+++ balder2d-1.0~rc1/src/menu/mainmenu.cpp      2007-07-11 09:33:14.000000000 -0700
190
 
@@ -30,18 +30,18 @@
191
 
   page->setPosition(150,200);
192
 
 
193
 
   startButton = new gcn::Button("Start New Game");
194
 
-  startButton->setEventId("startgame");
195
 
+  startButton->setActionEventId("startgame");
196
 
   startButton->addActionListener(this);
197
 
   startButton->setWidth(500);
198
 
 
199
 
   optionsButton = new gcn::Button("Options");
200
 
-  optionsButton->setEventId("optionsMenu");
201
 
+  optionsButton->setActionEventId("optionsMenu");
202
 
   optionsButton->addActionListener(this);
203
 
   optionsButton->setWidth(500);
204
 
 
205
 
   quitButton = new gcn::Button("Quit");
206
 
   quitButton->setWidth(500);
207
 
-  quitButton->setEventId("quitgame");
208
 
+  quitButton->setActionEventId("quitgame");
209
 
   quitButton->addActionListener(this);
210
 
 
211
 
   // Add them to the page container
212
 
@@ -58,10 +58,10 @@
213
 
     
214
 
 }
215
 
 
216
 
-void MainMenu::action(const std::string& action)
217
 
+void MainMenu::action(const gcn::ActionEvent& action)
218
 
 {
219
 
   // Main menu events.********************************************************
220
 
-  if (action == "optionsMenu")
221
 
+  if (action.getId() == "optionsMenu")
222
 
   {
223
 
     hide();
224
 
     optionsMenu->show();
225
 
diff -urNad balder2d-1.0~rc1~/src/menu/menu.cpp balder2d-1.0~rc1/src/menu/menu.cpp
226
 
--- balder2d-1.0~rc1~/src/menu/menu.cpp 2006-10-15 23:42:21.000000000 -0700
227
 
+++ balder2d-1.0~rc1/src/menu/menu.cpp  2007-07-11 09:33:14.000000000 -0700
228
 
@@ -70,7 +70,7 @@
229
 
   gcn::Widget::setGlobalFont(font);
230
 
 
231
 
   // create top level wigets we want on all menus
232
 
-  headerImage = new gcn::Image("menu/balderheader.png");
233
 
+  headerImage = gcn::Image::load("menu/balderheader.png");
234
 
   headerIcon = new gcn::Icon(headerImage);
235
 
   topContainer->add(headerIcon, 250, 40);
236
 
 
237
 
@@ -111,7 +111,7 @@
238
 
     // update the screen
239
 
     SDL_UpdateRect(screen,0,0,0,0);
240
 
   }
241
 
-  Menu::action("saveSettings");
242
 
+// Menu::action(ActionEvent(???, "saveSettings")); XXX FIXME: what wiget should send this event?
243
 
   if (startgame)
244
 
   {
245
 
     return true;
246
 
@@ -119,15 +119,15 @@
247
 
   return false;
248
 
 }
249
 
 
250
 
-void Menu::action(const std::string& action)
251
 
+void Menu::action(const gcn::ActionEvent& action)
252
 
 {
253
 
   // Main menu events.********************************************************
254
 
-  if (action == "startgame")
255
 
+  if (action.getId() == "startgame")
256
 
   {
257
 
     running = false;
258
 
     startgame = true;
259
 
   }
260
 
-  else if (action == "quitgame")
261
 
+  else if (action.getId() == "quitgame")
262
 
   {
263
 
     running = false;
264
 
     startgame = false;
265
 
diff -urNad balder2d-1.0~rc1~/src/menu/numberfield.cpp balder2d-1.0~rc1/src/menu/numberfield.cpp
266
 
--- balder2d-1.0~rc1~/src/menu/numberfield.cpp  2006-10-15 23:42:21.000000000 -0700
267
 
+++ balder2d-1.0~rc1/src/menu/numberfield.cpp   2007-07-11 09:33:14.000000000 -0700
268
 
@@ -10,6 +10,8 @@
269
 
 //
270
 
 //
271
 
 #include <sstream>
272
 
+#include <guichan/font.hpp>
273
 
+#include <guichan/graphics.hpp>
274
 
 #include "../../include/menu/numberfield.h"
275
 
 
276
 
 using namespace Balder;
277
 
@@ -40,11 +42,11 @@
278
 
        setText(ss.str());
279
 
 }
280
 
 
281
 
-void NumberField::mousePress(int x, int y, int button)
282
 
+void NumberField::mousePressed(MouseEvent& e)
283
 
 {
284
 
-       if (hasMouse() && button == MouseInput::LEFT)
285
 
+       if (e.getButton() == MouseEvent::LEFT)
286
 
        {
287
 
-               mCaretPosition = getFont()->getStringIndexAt(mText, x + mXScroll);
288
 
+               mCaretPosition = getFont()->getStringIndexAt(mText, e.getX() + mXScroll);
289
 
                fixScroll();
290
 
        }
291
 
 }
292
 
@@ -102,7 +104,7 @@
293
 
         graphics->setColor(faceColor);
294
 
         graphics->fillRectangle(Rectangle(0, 0, getWidth(), getHeight()));
295
 
     
296
 
-        if (hasFocus())
297
 
+        if (isFocused())
298
 
         {      
299
 
             drawCaret(graphics, getWidth()-getFont()->getWidth(mText.substr(mCaretPosition,mText.size())) - 4);
300
 
         }
301
 
diff -urNad balder2d-1.0~rc1~/src/menu/options.cpp balder2d-1.0~rc1/src/menu/options.cpp
302
 
--- balder2d-1.0~rc1~/src/menu/options.cpp      2006-10-15 23:42:21.000000000 -0700
303
 
+++ balder2d-1.0~rc1/src/menu/options.cpp       2007-07-11 09:33:14.000000000 -0700
304
 
@@ -33,7 +33,7 @@
305
 
     page->setPosition(150,200);
306
 
 
307
 
     backButton = new gcn::Button("Back");
308
 
-    backButton->setEventId("back");
309
 
+    backButton->setActionEventId("back");
310
 
     backButton->addActionListener(this);
311
 
 
312
 
     std::stringstream ss;
313
 
@@ -42,29 +42,29 @@
314
 
     numPlayersLabel = new gcn::Label(ss.str());
315
 
 
316
 
     morePlayersButton = new gcn::Button("+");
317
 
-    morePlayersButton->setEventId("morePlayers");
318
 
+    morePlayersButton->setActionEventId("morePlayers");
319
 
     morePlayersButton->addActionListener(this);
320
 
     morePlayersButton->setHeight(numPlayersLabel->getHeight()/2);
321
 
 
322
 
     lessPlayersButton = new gcn::Button("-");
323
 
-    lessPlayersButton->setEventId("lessPlayers");
324
 
+    lessPlayersButton->setActionEventId("lessPlayers");
325
 
     lessPlayersButton->addActionListener(this);
326
 
     lessPlayersButton->setHeight(numPlayersLabel->getHeight()/2);
327
 
     lessPlayersButton->setWidth(morePlayersButton->getWidth());
328
 
 
329
 
     soundVideoButton = new gcn::Button("Sound and Video");
330
 
-    soundVideoButton->setEventId("soundVideoMenu");
331
 
+    soundVideoButton->setActionEventId("soundVideoMenu");
332
 
     soundVideoButton->addActionListener(this);
333
 
     soundVideoButton->setAlignment(0); //alignment is justified left.
334
 
 
335
 
     gameSetupButton = new gcn::Button("Game Setup");
336
 
-    gameSetupButton->setEventId("gameSetupMenu");
337
 
+    gameSetupButton->setActionEventId("gameSetupMenu");
338
 
     gameSetupButton->addActionListener(this);
339
 
     gameSetupButton->setWidth(soundVideoButton->getWidth());
340
 
     gameSetupButton->setAlignment(0); //alignment is justified left.
341
 
 
342
 
     playersButton = new gcn::Button("Player Setup");
343
 
-    playersButton->setEventId("playerSetupMenu");
344
 
+    playersButton->setActionEventId("playerSetupMenu");
345
 
     playersButton->addActionListener(this);
346
 
     playersButton->setWidth(soundVideoButton->getWidth());
347
 
     playersButton->setAlignment(0); //alignment is justified left.
348
 
@@ -87,9 +87,9 @@
349
 
 {
350
 
 }
351
 
 
352
 
-void OptionsMenu::action(const std::string& action)
353
 
+void OptionsMenu::action(const gcn::ActionEvent& action)
354
 
 {
355
 
-    if (action == "morePlayers")
356
 
+    if (action.getId() == "morePlayers")
357
 
     {
358
 
         if (numPlayers < 8)
359
 
         {
360
 
@@ -100,7 +100,7 @@
361
 
             ConfigManager::SetNumPlayers(numPlayers);
362
 
         }
363
 
     }
364
 
-    else if (action == "lessPlayers")
365
 
+    else if (action.getId() == "lessPlayers")
366
 
     {
367
 
         if (numPlayers > 1)
368
 
         {
369
 
@@ -111,22 +111,22 @@
370
 
             ConfigManager::SetNumPlayers(numPlayers);
371
 
         }
372
 
     }
373
 
-    else if (action == "gameSetupMenu")
374
 
+    else if (action.getId() == "gameSetupMenu")
375
 
     {
376
 
         hide();
377
 
         gameSetupMenu->show();
378
 
     }
379
 
-    else if (action == "playerSetupMenu")
380
 
+    else if (action.getId() == "playerSetupMenu")
381
 
     {
382
 
         hide();
383
 
         playerSetupMenu->show();
384
 
     }
385
 
-    else if (action == "soundVideoMenu")
386
 
+    else if (action.getId() == "soundVideoMenu")
387
 
     {
388
 
         hide();
389
 
         soundVideoMenu->show();
390
 
     }
391
 
-    else if (action == "back")
392
 
+    else if (action.getId() == "back")
393
 
     {
394
 
         hide();
395
 
         ConfigManager::SaveConfigFile();
396
 
diff -urNad balder2d-1.0~rc1~/src/menu/playersetup.cpp balder2d-1.0~rc1/src/menu/playersetup.cpp
397
 
--- balder2d-1.0~rc1~/src/menu/playersetup.cpp  2006-10-15 23:42:21.000000000 -0700
398
 
+++ balder2d-1.0~rc1/src/menu/playersetup.cpp   2007-07-11 09:33:14.000000000 -0700
399
 
@@ -34,7 +34,7 @@
400
 
     page->setPosition(100,200);
401
 
 
402
 
     backButton = new gcn::Button("Back");
403
 
-    backButton->setEventId("back");
404
 
+    backButton->setActionEventId("back");
405
 
     backButton->addActionListener(this);
406
 
 
407
 
     currentPlayer = 1;
408
 
@@ -43,33 +43,33 @@
409
 
     currentPlayerLabel = new gcn::Label(ss.str());
410
 
 
411
 
     nextPlayerButton = new gcn::Button(" > ");
412
 
-    nextPlayerButton->setEventId("nextPlayer");
413
 
+    nextPlayerButton->setActionEventId("nextPlayer");
414
 
     nextPlayerButton->addActionListener(this);
415
 
 
416
 
     prevPlayerButton = new gcn::Button(" < ");
417
 
-    prevPlayerButton->setEventId("prevPlayer");
418
 
+    prevPlayerButton->setActionEventId("prevPlayer");
419
 
     prevPlayerButton->addActionListener(this);
420
 
 
421
 
     setRotateRightButton = new KeyBindButton("Rotate Right:", this);
422
 
-    setRotateRightButton->setEventId("bindRight");
423
 
+    setRotateRightButton->setActionEventId("bindRight");
424
 
     setRotateRightButton->addActionListener(this);
425
 
     rotateRightLabel = new gcn::Label(ConfigManager::GetPlayerControl(currentPlayer, "right"));
426
 
     setRotateRightButton->setAlignment(0);
427
 
 
428
 
     setRotateLeftButton = new KeyBindButton("Rotate Left:", this);
429
 
-    setRotateLeftButton->setEventId("bindLeft");
430
 
+    setRotateLeftButton->setActionEventId("bindLeft");
431
 
     setRotateLeftButton->addActionListener(this);
432
 
     rotateLeftLabel = new gcn::Label(ConfigManager::GetPlayerControl(currentPlayer, "left"));
433
 
     setRotateLeftButton->setAlignment(0);
434
 
 
435
 
     setStickPushButton = new KeyBindButton("Stick/Push Off:", this);
436
 
-    setStickPushButton->setEventId("bindStick");
437
 
+    setStickPushButton->setActionEventId("bindStick");
438
 
     setStickPushButton->addActionListener(this);
439
 
     stickPushLabel = new gcn::Label(ConfigManager::GetPlayerControl(currentPlayer, "stick"));
440
 
     setStickPushButton->setAlignment(0);
441
 
 
442
 
     setFireButton = new KeyBindButton("Fire:", this);
443
 
-    setFireButton->setEventId("bindFire");
444
 
+    setFireButton->setActionEventId("bindFire");
445
 
     setFireButton->addActionListener(this);
446
 
     fireLabel = new gcn::Label(ConfigManager::GetPlayerControl(currentPlayer, "fire"));
447
 
     setFireButton->setAlignment(0);
448
 
@@ -89,31 +89,31 @@
449
 
     playerColor = playerColor >> 8;
450
 
     Uint8 cRed = Uint8(playerColor);
451
 
 
452
 
-    redImage= new gcn::Image("menu/redspectrum.png");
453
 
+    redImage= gcn::Image::load("menu/redspectrum.png");
454
 
     redIcon = new gcn::Icon(redImage);
455
 
     redSlider = new gcn::Slider(0, 255);
456
 
     redSlider->setWidth(redIcon->getWidth());
457
 
     redSlider->setHeight(15);
458
 
     redSlider->setValue(double(cRed));
459
 
-    redSlider->setEventId("colorChange");
460
 
+    redSlider->setActionEventId("colorChange");
461
 
     redSlider->addActionListener(this);
462
 
 
463
 
-    greenImage= new gcn::Image("menu/greenspectrum.png");
464
 
+    greenImage= gcn::Image::load("menu/greenspectrum.png");
465
 
     greenIcon = new gcn::Icon(greenImage);
466
 
     greenSlider = new gcn::Slider(0, 255);
467
 
     greenSlider->setWidth(redIcon->getWidth());
468
 
     greenSlider->setHeight(15);
469
 
     greenSlider->setValue(double(cGreen));
470
 
-    greenSlider->setEventId("colorChange");
471
 
+    greenSlider->setActionEventId("colorChange");
472
 
     greenSlider->addActionListener(this);
473
 
 
474
 
-    blueImage= new gcn::Image("menu/bluespectrum.png");
475
 
+    blueImage= gcn::Image::load("menu/bluespectrum.png");
476
 
     blueIcon = new gcn::Icon(blueImage);
477
 
     blueSlider = new gcn::Slider(0, 255);
478
 
     blueSlider->setWidth(redIcon->getWidth());
479
 
     blueSlider->setHeight(15);
480
 
     blueSlider->setValue(double(cBlue));
481
 
-    blueSlider->setEventId("colorChange");
482
 
+    blueSlider->setActionEventId("colorChange");
483
 
     blueSlider->addActionListener(this);
484
 
 
485
 
     // AI Script list box.
486
 
@@ -122,7 +122,7 @@
487
 
     aiScrollArea = new gcn::ScrollArea();
488
 
     aiListBox = new gcn::ListBox();
489
 
     aiListBox->setWidth(redIcon->getWidth() - 12);
490
 
-    aiListBox->setEventId("changeAIScript");
491
 
+    aiListBox->setActionEventId("changeAIScript");
492
 
     aiListBox->addActionListener(this);
493
 
     aiDropDown = new gcn::DropDown(ailistModel, aiScrollArea, aiListBox);
494
 
     aiDropDown->setWidth(redIcon->getWidth());
495
 
@@ -163,10 +163,10 @@
496
 
 {
497
 
 }
498
 
 
499
 
-void PlayerSetupMenu::action(const std::string& action)
500
 
+void PlayerSetupMenu::action(const gcn::ActionEvent& action)
501
 
 {
502
 
     // Player options menu events.**********************************************
503
 
-    if (action == "nextPlayer")
504
 
+    if (action.getId() == "nextPlayer")
505
 
     {
506
 
         if (currentPlayer < ConfigManager::GetNumPlayers())
507
 
         {
508
 
@@ -174,7 +174,7 @@
509
 
             RefreshKeys();
510
 
         }
511
 
     }
512
 
-    else if (action == "prevPlayer")
513
 
+    else if (action.getId() == "prevPlayer")
514
 
     {
515
 
         if (currentPlayer > 1 )
516
 
         {
517
 
@@ -182,36 +182,36 @@
518
 
             RefreshKeys();
519
 
         }
520
 
     }
521
 
-    else if (action == "bindRight")
522
 
+    else if (action.getId() == "bindRight")
523
 
     {
524
 
         rotateRightLabel->setCaption(" ");
525
 
         actionToBind = "right";
526
 
         bindNextKey = true;
527
 
     }
528
 
-    else if (action == "bindLeft")
529
 
+    else if (action.getId() == "bindLeft")
530
 
     {
531
 
         rotateLeftLabel->setCaption(" ");
532
 
         actionToBind = "left";
533
 
         bindNextKey = true;
534
 
     }
535
 
-    else if (action == "bindStick")
536
 
+    else if (action.getId() == "bindStick")
537
 
     {
538
 
         stickPushLabel->setCaption(" ");
539
 
         actionToBind = "stick";
540
 
         bindNextKey = true;
541
 
     }
542
 
-    else if (action == "bindFire")
543
 
+    else if (action.getId() == "bindFire")
544
 
     {
545
 
         fireLabel->setCaption(" ");
546
 
         actionToBind = "fire";
547
 
         bindNextKey = true;
548
 
     }
549
 
-    else if (action == "changeAIScript")
550
 
+    else if (action.getId() == "changeAIScript")
551
 
     {
552
 
         ConfigManager::SetControlType(currentPlayer, ailistModel->getElementAt(aiListBox->getSelected()).c_str());
553
 
         RefreshKeys();
554
 
     }
555
 
-    else if (action == "colorChange")
556
 
+    else if (action.getId() == "colorChange")
557
 
     {
558
 
         Uint32 rgbColor = Uint8(redSlider->getValue());
559
 
         rgbColor = rgbColor << 8;
560
 
@@ -221,7 +221,7 @@
561
 
         sampleProbe->setProbeColor((rgbColor << 8) + 0xFF);
562
 
         ConfigManager::SetPlayerColor(currentPlayer, rgbColor);
563
 
     }
564
 
-    else if (action == "back")
565
 
+    else if (action.getId() == "back")
566
 
     {
567
 
         hide();
568
 
         parent->show();
569
 
diff -urNad balder2d-1.0~rc1~/src/menu/sampleprobewidget.cpp balder2d-1.0~rc1/src/menu/sampleprobewidget.cpp
570
 
--- balder2d-1.0~rc1~/src/menu/sampleprobewidget.cpp    2006-10-15 23:42:21.000000000 -0700
571
 
+++ balder2d-1.0~rc1/src/menu/sampleprobewidget.cpp     2007-07-11 09:33:14.000000000 -0700
572
 
@@ -31,7 +31,7 @@
573
 
 SampleProbeWidget::SampleProbeWidget(): probeFrame(0), probeColor(0)
574
 
 {
575
 
     // Loads sprite for sample probe.
576
 
-    probeSpriteImage = new gcn::Image("probe.png");
577
 
+    probeSpriteImage = gcn::Image::load("probe.png");
578
 
     if (probeSpriteImage == 0){
579
 
         throw "could not load Probe sprite!";
580
 
     }
581
 
diff -urNad balder2d-1.0~rc1~/src/menu/soundvideo.cpp balder2d-1.0~rc1/src/menu/soundvideo.cpp
582
 
--- balder2d-1.0~rc1~/src/menu/soundvideo.cpp   2006-10-15 23:42:21.000000000 -0700
583
 
+++ balder2d-1.0~rc1/src/menu/soundvideo.cpp    2007-07-11 09:33:14.000000000 -0700
584
 
@@ -30,34 +30,34 @@
585
 
     page->setPosition(150,200);
586
 
 
587
 
     backButton = new gcn::Button("Back");
588
 
-    backButton->setEventId("back");
589
 
+    backButton->setActionEventId("back");
590
 
     backButton->addActionListener(this);
591
 
 
592
 
     fullScreenCheckbox = new gcn::CheckBox("fullscreen",
593
 
                                            ConfigManager::GetIntValue("Video", "fullscreen"));
594
 
-    fullScreenCheckbox->setEventId("toggleFullscreen");
595
 
+    fullScreenCheckbox->setActionEventId("toggleFullscreen");
596
 
     fullScreenCheckbox->addActionListener(this);
597
 
 
598
 
     soundCheckbox = new gcn::CheckBox("sound", ConfigManager::GetIntValue("Sound", "sound"));
599
 
-    soundCheckbox->setEventId("toggleSound");
600
 
+    soundCheckbox->setActionEventId("toggleSound");
601
 
     soundCheckbox->addActionListener(this);
602
 
 
603
 
     musicCheckbox = new gcn::CheckBox("music", ConfigManager::GetIntValue("Sound", "music"));
604
 
-    musicCheckbox->setEventId("toggleMusic");
605
 
+    musicCheckbox->setActionEventId("toggleMusic");
606
 
     musicCheckbox->addActionListener(this);
607
 
 
608
 
     fxVolumeLabel = new gcn::Label("    volume");
609
 
     fxVolumeSlider = new gcn::Slider();
610
 
     fxVolumeSlider->setSize(200, fxVolumeLabel->getHeight()/2);
611
 
     fxVolumeSlider->setValue(ConfigManager::GetDoubleValue("Sound", "fxvolume"));
612
 
-    fxVolumeSlider->setEventId("fxVolumeChange");
613
 
+    fxVolumeSlider->setActionEventId("fxVolumeChange");
614
 
     fxVolumeSlider->addActionListener(this);
615
 
 
616
 
     musicVolumeLabel = new gcn::Label("    volume");
617
 
     musicVolumeSlider = new gcn::Slider();
618
 
     musicVolumeSlider->setSize(200, musicVolumeLabel->getHeight()/2);
619
 
     musicVolumeSlider->setValue(ConfigManager::GetDoubleValue("Sound", "musicvolume"));
620
 
-    musicVolumeSlider->setEventId("musicVolumeChange");
621
 
+    musicVolumeSlider->setActionEventId("musicVolumeChange");
622
 
     musicVolumeSlider->addActionListener(this);
623
 
 
624
 
     page->add(backButton, 0, 300);
625
 
@@ -74,32 +74,32 @@
626
 
 {
627
 
 }
628
 
 
629
 
-void SoundVideoMenu::action(const std::string& action)
630
 
+void SoundVideoMenu::action(const gcn::ActionEvent& action)
631
 
 {
632
 
-    if (action == "toggleSound")
633
 
+    if (action.getId() == "toggleSound")
634
 
     {
635
 
         ConfigManager::SetIntValue("Sound", "sound", soundCheckbox->isMarked());
636
 
     }
637
 
-    else if (action == "toggleMusic")
638
 
+    else if (action.getId() == "toggleMusic")
639
 
     {
640
 
         ConfigManager::SetIntValue("Sound", "music", musicCheckbox->isMarked());
641
 
 //        sound->PlayMusic("menu");
642
 
     }
643
 
-    else if (action == "fxVolumeChange")
644
 
+    else if (action.getId() == "fxVolumeChange")
645
 
     {
646
 
         Mix_Volume(-1, (int)(MIX_MAX_VOLUME * fxVolumeSlider->getValue()));
647
 
         ConfigManager::SetDoubleValue("Sound", "fxvolume", fxVolumeSlider->getValue());
648
 
     }
649
 
-    else if (action == "musicVolumeChange")
650
 
+    else if (action.getId() == "musicVolumeChange")
651
 
     {
652
 
         Mix_VolumeMusic(int(MIX_MAX_VOLUME * musicVolumeSlider->getValue()));
653
 
         ConfigManager::SetDoubleValue("Sound", "musicvolume", musicVolumeSlider->getValue());
654
 
     }
655
 
-    else if (action == "toggleFullscreen")
656
 
+    else if (action.getId() == "toggleFullscreen")
657
 
     {
658
 
         ConfigManager::SetIntValue("Video", "fullscreen", fullScreenCheckbox->isMarked());
659
 
     }
660
 
-    else if (action == "back")
661
 
+    else if (action.getId() == "back")
662
 
     {
663
 
         hide();
664
 
         parent->show();