pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.28,1.29 editor.c


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.28,1.29 editor.cxx,1.41,1.42 editor_event.cxx,1.42,1.43 generic_property_frame.cxx,1.2,1.3
Date: 1 Dec 2002 17:08:49 -0000

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

Modified Files:
        Makefile.am editor.cxx editor_event.cxx 
        generic_property_frame.cxx 
Log Message:
- removed some old cruft


Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/Makefile.am,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Makefile.am 29 Nov 2002 22:54:22 -0000      1.28
+++ Makefile.am 1 Dec 2002 17:08:47 -0000       1.29
@@ -33,6 +33,7 @@
         level_resizer.hxx level_resizer.cxx \
        object_manager.cxx object_manager.hxx \
        object_selector.cxx object_selector.hxx \
+        object_selector_window.hxx object_selector_window.cxx \
        panel.cxx panel.hxx \
        panel_icons.cxx panel_icons.hxx \
        property_frame.cxx property_frame.hxx \

Index: editor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- editor.cxx  29 Nov 2002 22:54:22 -0000      1.41
+++ editor.cxx  1 Dec 2002 17:08:47 -0000       1.42
@@ -198,7 +198,7 @@
 
   gui->show ();
 
-  if (get_gui_manager ()->get_focus () == get_gui_manager ())
+  if (get_gui_manager()->get_focus () == get_gui_manager ())
     CL_Display::draw_rect (25, 0, CL_Display::get_width (), 
CL_Display::get_height (),
                           1.0f, 1.0f, 1.0f);
 
@@ -434,32 +434,40 @@
 void
 Editor::move_objects()
 {
-  int move_speed = 1;
-  move_x = 0;
-  move_y = 0;
-
-  if (CL_Keyboard::get_keycode(CL_KEY_RSHIFT)
-      || CL_Keyboard::get_keycode(CL_KEY_RSHIFT))
+  if (get_gui_manager()->get_focus () == get_gui_manager ())
     {
-      move_speed = 10;
-    }
+      // FIXME: this is really a dirty dirty hack
+      // FIXME: To fix this the whole editor should be build up out of 
CL_Components
+      int move_speed = 1;
+      move_x = 0;
+      move_y = 0;
 
-  if (CL_Keyboard::get_keycode(CL_KEY_LEFT))
-    move_x = -move_speed;
-  else if (CL_Keyboard::get_keycode(CL_KEY_RIGHT))
-    move_x = move_speed;
+      if (CL_Keyboard::get_keycode(CL_KEY_RSHIFT)
+          || CL_Keyboard::get_keycode(CL_KEY_RSHIFT))
+        {
+          move_speed = 10;
+        }
 
-  if (CL_Keyboard::get_keycode(CL_KEY_UP))
-    move_y = -move_speed;
-  else if (CL_Keyboard::get_keycode(CL_KEY_DOWN))
-    move_y = move_speed;
+      if (CL_Keyboard::get_keycode(CL_KEY_LEFT))
+        move_x = -move_speed;
+      else if (CL_Keyboard::get_keycode(CL_KEY_RIGHT))
+        move_x = move_speed;
+
+      if (CL_Keyboard::get_keycode(CL_KEY_UP))
+        move_y = -move_speed;
+      else if (CL_Keyboard::get_keycode(CL_KEY_DOWN))
+        move_y = move_speed;
         
-  selection->move(move_x, move_y);
+      selection->move(move_x, move_y);
+    }
 }
 
 void
 Editor::interactive_move_object()
 {
+  // FIXME: this is really a dirty dirty hack
+  // FIXME: To fix this the whole editor should be build up out of 
CL_Components
+
   CL_System::keep_alive();
 
   selection->drag ();

Index: editor_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- editor_event.cxx    29 Nov 2002 22:54:22 -0000      1.42
+++ editor_event.cxx    1 Dec 2002 17:08:47 -0000       1.43
@@ -29,7 +29,6 @@
 #include "../debug.hxx"
 #include "../globals.hxx"
 #include "../game_session.hxx"
-#include "../message_box.hxx"
 #include "../system.hxx"
 #include "../pingus_error.hxx"
 #include "../loading.hxx"
@@ -46,6 +45,7 @@
 #include "property_window.hxx"
 #include "level_property_window.hxx"
 #include "level_resizer.hxx"
+#include "object_selector_window.hxx"
 #include "../screen_manager.hxx"
 
 namespace EditorNS {
@@ -181,7 +181,8 @@
          // Insert a new object, present the ObjectsSelector to select
          // one. 
        case CL_KEY_INSERT:
-         editor_insert_new_object();
+         //editor_insert_new_object();
+          new ObjectSelectorWindow(editor->gui);
          break;
     
          // Load a level from file.
@@ -556,7 +557,6 @@
       }
       catch(const PingusError& err) {
        std::cout << err.get_message () << std::endl;
-       PingusMessageBox(err.get_message ());
       }
     }
 }

Index: generic_property_frame.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editor/generic_property_frame.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- generic_property_frame.cxx  30 Nov 2002 15:06:31 -0000      1.2
+++ generic_property_frame.cxx  1 Dec 2002 17:08:47 -0000       1.3
@@ -174,7 +174,13 @@
   {
   }
 
-  virtual ~EnumDataBox() {}
+  virtual ~EnumDataBox() 
+  {
+    for (RButtonIter i = radio_buttons.begin(); i != radio_buttons.end(); ++i)
+      {
+        delete (*i).second;
+      }  
+  }
 
   void read_data() 
   {





reply via email to

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