[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src gui_screen.cxx,1.5,1.6 gui_screen.hxx
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src gui_screen.cxx,1.5,1.6 gui_screen.hxx,1.5,1.6 client.cxx,1.16,1.17 client.hxx,1.11,1.12 |
Date: |
17 Aug 2002 01:03:29 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv9606
Modified Files:
gui_screen.cxx gui_screen.hxx client.cxx client.hxx
Log Message:
- added handling for action_axis, not really useable, but works
Index: gui_screen.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/gui_screen.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gui_screen.cxx 17 Aug 2002 00:26:49 -0000 1.5
+++ gui_screen.cxx 17 Aug 2002 01:03:27 -0000 1.6
@@ -22,6 +22,7 @@
#include "debug.hxx"
#include "gui/gui_manager.hxx"
#include "input/button_event.hxx"
+#include "input/axis_event.hxx"
#include "gui_screen.hxx"
using namespace GUI;
@@ -71,7 +72,11 @@
case Input::AxisEventType:
{
-
+ Input::AxisEvent* event = dynamic_cast<Input::AxisEvent*>(*i);
+ if (event->name == Input::action)
+ {
+ on_action_axis_move (event->dir);
+ }
}
break;
Index: gui_screen.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/gui_screen.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gui_screen.hxx 17 Aug 2002 00:26:49 -0000 1.5
+++ gui_screen.hxx 17 Aug 2002 01:03:27 -0000 1.6
@@ -63,6 +63,8 @@
virtual void on_armageddon_release () {}
virtual void on_escape_release () {}
+ virtual void on_action_axis_move (float) {}
+
private:
void process_button_event (Input::ButtonEvent* event);
};
Index: client.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/client.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- client.cxx 14 Aug 2002 12:45:01 -0000 1.16
+++ client.cxx 17 Aug 2002 01:03:27 -0000 1.17
@@ -437,6 +437,15 @@
}
void
+Client::on_action_axis_move (float move)
+{
+ if (move > 0)
+ button_panel->next_action ();
+ else if (move < 0)
+ button_panel->previous_action ();
+}
+
+void
Client::draw ()
{
GUIScreen::draw ();
Index: client.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/client.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- client.hxx 3 Aug 2002 11:37:45 -0000 1.11
+++ client.hxx 17 Aug 2002 01:03:27 -0000 1.12
@@ -112,6 +112,7 @@
void on_fast_forward_press ();
void on_armageddon_press ();
void on_escape_press ();
+ void on_action_axis_move (float);
};
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src gui_screen.cxx,1.5,1.6 gui_screen.hxx,1.5,1.6 client.cxx,1.16,1.17 client.hxx,1.11,1.12,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/gui gui_manager.cxx,1.10,1.11 gui_manager.hxx,1.7,1.8
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src screen_manager.cxx,1.11,1.12
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/gui gui_manager.cxx,1.10,1.11 gui_manager.hxx,1.7,1.8
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src screen_manager.cxx,1.11,1.12
- Index(es):