[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input/pointers mouse_pointer.cxx, 1.
From: |
Ingo Ruhnke |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input/pointers mouse_pointer.cxx, 1.5, 1.6 mouse_pointer.hxx, 1.6, 1.7 |
Date: |
Sat, 13 Dec 2003 17:23:42 +0100 |
Update of /var/lib/cvs/Games/Pingus/src/input/pointers
In directory dark:/tmp/cvs-serv13851/src/input/pointers
Modified Files:
mouse_pointer.cxx mouse_pointer.hxx
Log Message:
- editor starts now
- level startup screen also shows partly
Index: mouse_pointer.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/pointers/mouse_pointer.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mouse_pointer.cxx 20 Oct 2003 19:28:55 -0000 1.5
+++ mouse_pointer.cxx 13 Dec 2003 16:23:40 -0000 1.6
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <ClanLib/Display/mouse.h>
+#include <ClanLib/Display/input_event.h>
#include "mouse_pointer.hxx"
namespace Pingus {
@@ -26,11 +27,8 @@
MousePointer::MousePointer ()
: x_pos(0),
- y_pos(0)
-#ifdef CLANLIB_0_6
-,
+ y_pos(0),
move_slot(CL_Mouse::sig_move().connect(this,
&Input::Pointers::MousePointer::move_signal))
-#endif
{
}
@@ -49,9 +47,8 @@
void
MousePointer::set_pos (float new_x, float new_y)
{
-#ifdef CLANLIB_0_6
- CL_Mouse::set_position(new_x, new_y);
-#endif
+ CL_Mouse::set_position(static_cast<int>(new_x),
+ static_cast<int>(new_y));
}
void
@@ -60,10 +57,10 @@
}
void
-MousePointer::move_signal (int x, int y)
+MousePointer::move_signal (const CL_InputEvent& event)
{
- x_pos = x;
- y_pos = y;
+ x_pos = event.mouse_pos.x;
+ y_pos = event.mouse_pos.y;
}
} // namespace Pointers
Index: mouse_pointer.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/pointers/mouse_pointer.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mouse_pointer.hxx 20 Oct 2003 19:28:55 -0000 1.6
+++ mouse_pointer.hxx 13 Dec 2003 16:23:40 -0000 1.7
@@ -23,6 +23,8 @@
#include <ClanLib/Signals/slot.h>
#include "../pointer.hxx"
+class CL_InputEvent;
+
namespace Pingus {
namespace Input {
namespace Pointers {
@@ -50,7 +52,7 @@
virtual void update (float);
private:
- void move_signal (int x, int y);
+ void move_signal (const CL_InputEvent& event);
MousePointer (const MousePointer&);
MousePointer& operator= (const MousePointer&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input/pointers mouse_pointer.cxx, 1.5, 1.6 mouse_pointer.hxx, 1.6, 1.7,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.57,1.58
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons joystick_button.cxx, 1.5, 1.6 mouse_button.cxx, 1.5, 1.6
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.57,1.58
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons joystick_button.cxx, 1.5, 1.6 mouse_button.cxx, 1.5, 1.6
- Index(es):