pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx,1.6,1.7 manager.


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx,1.6,1.7 manager.hxx,1.5,1.6 worldmap.cxx,1.5,1.6 worldmap.hxx,1.4,1.5
Date: 3 Aug 2002 09:59:25 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/worldmap
In directory dark:/tmp/cvs-serv2859/worldmap

Modified Files:
        manager.cxx manager.hxx worldmap.cxx worldmap.hxx 
Log Message:
some more fixes to the GUIScreen and ScreenManager pop/replace screens works 
now mostly

Index: manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/manager.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- manager.cxx 2 Aug 2002 22:55:19 -0000       1.6
+++ manager.cxx 3 Aug 2002 09:59:23 -0000       1.7
@@ -18,6 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <ClanLib/Display/Input/input.h>
+#include "../screen_manager.hxx"
 #include "../path_manager.hxx"
 #include "../delta_manager.hxx"
 #include "../display.hxx"
@@ -47,6 +48,12 @@
   gui_manager->add (&worldmap_component);
 }
 
+void
+WorldMapManager::on_startup ()
+{
+  exit_worldmap = false;
+}
+
 WorldMapManager::~WorldMapManager ()
 {
 }
@@ -85,6 +92,19 @@
 }
   */
 
+void
+WorldMapManager::on_escape_press ()
+{
+  std::cout << "WorldMapManager::on_escape_press ()..." << std::endl;
+  exit_worldmap = true;
+}
+
+void
+WorldMapManager::update (float)
+{
+  if (exit_worldmap)
+    ScreenManager::instance ()->pop_screen ();
+}
 
 void
 WorldMapManager::WorldMapComponent::draw ()

Index: manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/manager.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- manager.hxx 2 Aug 2002 22:55:19 -0000       1.5
+++ manager.hxx 3 Aug 2002 09:59:23 -0000       1.6
@@ -44,7 +44,7 @@
     {
     public:
       void on_primary_button_press (int x, int y);
-
+ 
       void draw ();
       void update (float delta);
       
@@ -64,6 +64,9 @@
   public:
     ~WorldMapManager ();
   
+    void update (float);
+    void on_escape_press ();
+    void on_startup ();
   private:
     /// Load all required resources if not already done
     void init ();

Index: worldmap.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/worldmap.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- worldmap.cxx        2 Aug 2002 22:55:19 -0000       1.5
+++ worldmap.cxx        3 Aug 2002 09:59:23 -0000       1.6
@@ -156,18 +156,6 @@
 {
   if (!catch_input) return;
 
-  /*  if (device == CL_Input::keyboards[0])
-      {
-      switch(key.id)
-      {
-      case CL_KEY_ESCAPE:
-      do_quit = true;
-      break;
-      default:
-      break;
-      }
-      }
-  */
   CL_Vector offset = get_offset ();
 
   {      

Index: worldmap.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/worldmap.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- worldmap.hxx        2 Aug 2002 22:55:19 -0000       1.4
+++ worldmap.hxx        3 Aug 2002 09:59:23 -0000       1.5
@@ -81,7 +81,7 @@
          - calculate the shortest path
          - let the pingu walk */
       void on_primary_button_press (int x, int y);
- 
+
       /** Disable all event catching */
       void disable_button_events ();
   




reply via email to

[Prev in Thread] Current Thread [Next in Thread]