summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-15 23:17:00 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-15 23:17:00 +0000
commit97cac06ae12026f4be3765f68b0aea3caf02d8f0 (patch)
tree7b79d7e7319bfe542362ce3396295dd3aded3940 /src
parent81aee6c4c85649793d9cf38f5a5bc1bdfffdd78e (diff)
downloadmana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.tar.gz
mana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.tar.bz2
mana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.tar.xz
mana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.zip
Initialize joystick to NULL and allow right shift and control keys to be used.
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp6
-rw-r--r--src/gui/box.cpp5
-rw-r--r--src/gui/box.h42
-rw-r--r--src/gui/char_server.h2
-rw-r--r--src/gui/updatewindow.cpp5
5 files changed, 31 insertions, 29 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 00b875f7..f6d569b1 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -71,7 +71,7 @@ int startX = 0, startY = 0;
int gameTime = 0;
Being *autoTarget = NULL;
Engine *engine = NULL;
-SDL_Joystick *joypad; /**< Joypad object */
+SDL_Joystick *joypad = NULL; /**< Joypad object */
OkDialog *deathNotice = NULL;
ConfirmDialog *exitConfirm = NULL;
@@ -491,7 +491,7 @@ void do_input()
// XXX Is this too hackish? I'm not sure if making the Gui
// class a KeyListener is a good idea and works as expected
// at all...
- if (keys[SDLK_LSHIFT]) {
+ if (keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]) {
used = true;
}
@@ -707,7 +707,7 @@ void do_input()
// Attacking monsters
if (player_node->action == STAND)
{
- if (keys[SDLK_LCTRL] || joy[JOY_BTN0])
+ if (keys[SDLK_LCTRL] || keys[SDLK_RCTRL] || joy[JOY_BTN0])
{
Being *monster = attack(x, y, player_node->direction);
if (monster == NULL && autoTarget != NULL)
diff --git a/src/gui/box.cpp b/src/gui/box.cpp
index 183eabc3..6af3ae3e 100644
--- a/src/gui/box.cpp
+++ b/src/gui/box.cpp
@@ -23,9 +23,8 @@
#include "box.h"
-Box::Box()
- : padding(0),
- gcn::Container()
+Box::Box():
+ padding(0)
{
setOpaque(false);
}
diff --git a/src/gui/box.h b/src/gui/box.h
index fc6b91ae..d65a6ac3 100644
--- a/src/gui/box.h
+++ b/src/gui/box.h
@@ -29,27 +29,27 @@
class Box : public gcn::Container
{
- protected:
- Box();
- virtual ~Box();
-
- /*
- * Spacing between client widgets
- */
- unsigned int padding;
-
- virtual void draw(gcn::Graphics *) = 0;
-
- public:
- /*
- * Returns padding
- */
- unsigned int getPadding();
-
- /*
- * Sets padding between widgets
- */
- void setPadding(unsigned int);
+ protected:
+ Box();
+ virtual ~Box();
+
+ /*
+ * Spacing between client widgets
+ */
+ unsigned int padding;
+
+ virtual void draw(gcn::Graphics *) = 0;
+
+ public:
+ /*
+ * Returns padding
+ */
+ unsigned int getPadding();
+
+ /*
+ * Sets padding between widgets
+ */
+ void setPadding(unsigned int);
};
#endif
diff --git a/src/gui/char_server.h b/src/gui/char_server.h
index 42627b9c..bd41a479 100644
--- a/src/gui/char_server.h
+++ b/src/gui/char_server.h
@@ -32,6 +32,8 @@
*/
class ServerListModel : public gcn::ListModel {
public:
+ virtual ~ServerListModel() {};
+
int getNumberOfElements();
std::string getElementAt(int i);
};
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 7ee84016..75f94b4b 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -282,8 +282,9 @@ void updateData()
case UPDATE_ERROR:
SDL_WaitThread(thread, NULL);
new OkDialog(
- "Error", ("The update process is incomplete. ",
- "It is strongly recommended that you try again later"),
+ "Error",
+ "The update process is incomplete.\n"
+ "It is strongly recommended that you try again later",
updaterWindow);
logger->log("Error during the update process");
downloadStatus = UPDATE_IDLE;