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.21,1.22 editor.c


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.21,1.22 editor.cxx,1.12,1.13 editor.hxx,1.5,1.6 editor_event.cxx,1.15,1.16 editor_event.hxx,1.8,1.9 level_property_window.cxx,1.1,1.2 level_property_window.hxx,1.1,1.2 object_manager.hxx,1.5,1.6 panel.cxx,1.2,1.3 panel_icons.cxx,1.3,1.4 panel_icons.hxx,1.3,1.4 property_window.cxx,1.4,1.5 scroll_map.cxx,1.2,1.3
Date: 1 Jul 2002 12:46:24 -0000

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

Modified Files:
        Makefile.am editor.cxx editor.hxx editor_event.cxx 
        editor_event.hxx level_property_window.cxx 
        level_property_window.hxx object_manager.hxx panel.cxx 
        panel_icons.cxx panel_icons.hxx property_window.cxx 
        scroll_map.cxx 
Log Message:
Added level property window

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- Makefile.am 1 Jul 2002 09:09:31 -0000       1.21
+++ Makefile.am 1 Jul 2002 12:46:22 -0000       1.22
@@ -40,6 +40,7 @@
 groundpiece_window.hxx groundpiece_window.cxx \
 property_window.hxx property_window.cxx \
 property_frame.hxx property_frame.cxx \
-entrance_window.hxx entrance_window.cxx
+entrance_window.hxx entrance_window.cxx \
+level_property_window.hxx level_property_window.cxx
 
 # EOF #

Index: editor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- editor.cxx  30 Jun 2002 22:03:13 -0000      1.12
+++ editor.cxx  1 Jul 2002 12:46:22 -0000       1.13
@@ -47,6 +47,7 @@
 #include "object_manager.hxx"
 #include "action_window.hxx"
 #include "property_window.hxx"
+#include "level_property_window.hxx"
 
 using namespace Pingus::Editor;
 
@@ -81,6 +82,7 @@
 
   action_window = new ActionWindow (gui, object_manager->get_actions ());
   property_window = new Pingus::Editor::PropertyWindow (gui);
+  level_property_window = new Pingus::Editor::LevelPropertyWindow (gui, 
object_manager);
 
   view = new EditorView (0, 0, CL_Display::get_width (), 
CL_Display::get_height (), 0, 0);
 

Index: editor.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- editor.hxx  30 Jun 2002 22:03:13 -0000      1.5
+++ editor.hxx  1 Jul 2002 12:46:22 -0000       1.6
@@ -40,6 +40,7 @@
   namespace Editor
   {
     class PropertyWindow;
+    class LevelPropertyWindow;
   }
 }
 
@@ -81,6 +82,8 @@
   CL_GUIManager* gui;
 
   ActionWindow*   action_window;
+
+  Pingus::Editor::LevelPropertyWindow* level_property_window;
   Pingus::Editor::PropertyWindow* property_window;
 
   enum { SELECTOR_TOOL, ZOOM_TOOL } tool;

Index: editor_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- editor_event.cxx    30 Jun 2002 22:03:13 -0000      1.15
+++ editor_event.cxx    1 Jul 2002 12:46:22 -0000       1.16
@@ -45,6 +45,7 @@
 #include "editor.hxx"
 #include "action_window.hxx"
 #include "property_window.hxx"
+#include "level_property_window.hxx"
 
 EditorEvent::EditorEvent()
   : is_enabled (1)
@@ -844,6 +845,15 @@
     editor->property_window->show (false);
   else
     editor->property_window->show (true);
+}
+
+void
+EditorEvent::editor_show_level_properties ()
+{
+  if (editor->level_property_window->is_visible ())
+    editor->level_property_window->show (false);
+  else
+    editor->level_property_window->show (true);  
 }
 
 bool

Index: editor_event.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- editor_event.hxx    30 Jun 2002 22:03:13 -0000      1.8
+++ editor_event.hxx    1 Jul 2002 12:46:22 -0000       1.9
@@ -81,8 +81,12 @@
   /** Display the configuration window for the actions */
   void editor_show_actions_window ();
   
-  /** Display the propertie dialog for the current object */
+  /** Display the property dialog for the current object */
   void editor_show_object_properties ();
+
+  /** Display the property dialog for window width/height, number of
+      pingus, etc. */
+  void editor_show_level_properties ();
 
   /** Decrease the owner number or another value specific to the
       current object */

Index: level_property_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/level_property_window.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- level_property_window.cxx   29 Jun 2002 17:39:21 -0000      1.1
+++ level_property_window.cxx   1 Jul 2002 12:46:22 -0000       1.2
@@ -17,6 +17,8 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include "object_manager.hxx"
+#include "../string_converter.hxx"
 #include "level_property_window.hxx"
 
 /******************
@@ -41,8 +43,34 @@
  [  OK  ] [Cancel]
 *********************/
 
-LevelPropertyWindow::LevelPropertyWindow ()
+using namespace Pingus::Editor;
+
+LevelPropertyWindow::LevelPropertyWindow (CL_Component* parent, ObjectManager* 
manager)
+  : CL_Window (CL_Rect (0, 0, 200, 300), "Level Properties", parent),
+    levelname_label (CL_Rect (10, 10, 90, 30), "Levelname", get_client_area 
()),
+    levelname_input (CL_Rect(110, 10, 190, 30), "bla", get_client_area ()),
+
+    descritpion_label (CL_Rect (10, 30, 90, 50), "Description", 
get_client_area ()),
+    //description_input(CL_Rect(110, 30, 190, 50), "descrip", get_client_area 
()),
+
+    author_label (CL_Rect (10, 50, 90, 70), "Author", get_client_area ()),
+    author_input (CL_Rect(110, 50, 190, 70), "me", get_client_area ()),
+
+    number_of_pingus_label (CL_Rect (10, 70, 90, 90), "Number of Pingus", 
get_client_area ()),
+    number_of_pingus_input (CL_Rect(110, 70, 190, 90), to_string (10), 
get_client_area ()),
+
+    pingus_to_save_label (CL_Rect (10, 90, 90, 110), "Pingus To Save", 
get_client_area ()),
+    pingus_to_save_input (CL_Rect(110, 90, 190, 110), to_string (10), 
get_client_area ()),
+
+    time_label (CL_Rect (10, 110, 90, 130), "Time", get_client_area ()),
+    time_input (CL_Rect(110, 110, 190, 130), to_string (-1), get_client_area 
())
+{  
+  show (false);
+}
+
+LevelPropertyWindow::~LevelPropertyWindow ()
 {
+  
 }
 
 /* EOF */

Index: level_property_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/level_property_window.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- level_property_window.hxx   29 Jun 2002 17:39:21 -0000      1.1
+++ level_property_window.hxx   1 Jul 2002 12:46:22 -0000       1.2
@@ -20,13 +20,40 @@
 #ifndef HEADER_PINGUS_LEVEL_PROPERTY_WINDOW_HXX
 #define HEADER_PINGUS_LEVEL_PROPERTY_WINDOW_HXX
 
-class LevelPropertyWindow
+#include <ClanLib/gui.h>
+
+class ObjectManager;
+
+namespace Pingus
 {
-private:
-  
-public:
-  LevelPropertyWindow ();
-};
+  namespace Editor
+  {
+    class LevelPropertyWindow : public CL_Window
+    {
+    private:
+      CL_Label    levelname_label;
+      CL_InputBox levelname_input;
+
+      CL_Label    descritpion_label;
+      //CL_InputBox description_input;
+
+      CL_Label    author_label;
+      CL_InputBox author_input;
+
+      CL_Label    number_of_pingus_label;
+      CL_InputBox number_of_pingus_input;
+
+      CL_Label    pingus_to_save_label;
+      CL_InputBox pingus_to_save_input;
+
+      CL_Label    time_label;
+      CL_InputBox time_input;
+    public:
+      LevelPropertyWindow (CL_Component* parent, ObjectManager*);
+      ~LevelPropertyWindow ();
+    };
+  }
+}
 
 #endif
 

Index: object_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- object_manager.hxx  28 Jun 2002 22:21:59 -0000      1.5
+++ object_manager.hxx  1 Jul 2002 12:46:22 -0000       1.6
@@ -20,6 +20,7 @@
 #ifndef HEADER_PINGUS_EDITOR_OBJECT_MANAGER_HXX
 #define HEADER_PINGUS_EDITOR_OBJECT_MANAGER_HXX
 
+#include <list>
 #include <map>
 #include "../color.hxx"
 #include "../action_data.hxx"

Index: panel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/panel.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- panel.cxx   29 Jun 2002 09:44:56 -0000      1.2
+++ panel.cxx   1 Jul 2002 12:46:22 -0000       1.3
@@ -120,13 +120,14 @@
       buttons.push_back(new PanelIconInsertObject);
       
       buttons.push_back(new PanelIconCopy);
-      buttons.push_back(new PanelIconEdit);
+      buttons.push_back(new PanelIconObjectProperties);
       buttons.push_back(new PanelIconDelete);
 
       buttons.push_back(new PanelIconRegionZoom ());
       buttons.push_back(new PanelIconZoomIn ());
       buttons.push_back(new PanelIconZoomOut ());
 
+      buttons.push_back(new PanelIconLevelProperties);
       buttons.push_back(new PanelIconSetupActions());
 
       buttons.push_back(new PanelIconRun);

Index: panel_icons.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/panel_icons.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- panel_icons.cxx     29 Jun 2002 11:54:22 -0000      1.3
+++ panel_icons.cxx     1 Jul 2002 12:46:22 -0000       1.4
@@ -85,27 +85,27 @@
   editor->get_event()->editor_duplicate_current_selection();
 }
 
-PanelIconEdit::PanelIconEdit()
+PanelIconLevelProperties::PanelIconLevelProperties()
 {
-  tooltip = _("Edit Properties (not implemented)");
+  tooltip = _("Edit Object Properties");
   sur = PingusResource::load_surface("editor/edit", "core");  
 }
 
-PanelIconPreferences::PanelIconPreferences()
+void 
+PanelIconLevelProperties::on_click()
 {
-  tooltip = _("Edit Preferences (not implemented)");
-  sur = PingusResource::load_surface("editor/preferences", "core");
+  editor->get_event ()->editor_show_level_properties ();
 }
 
-void
-PanelIconPreferences::on_click()
+PanelIconObjectProperties::PanelIconObjectProperties()
 {
+  tooltip = _("Edit Level Properties");
+  sur = PingusResource::load_surface("editor/preferences", "core");
 }
 
-void 
-PanelIconEdit::on_click()
+void
+PanelIconObjectProperties::on_click()
 {
-  std::cout << "Preferences not implemented" << std::endl;
   editor->get_event ()->editor_show_object_properties ();
 }
 

Index: panel_icons.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/panel_icons.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- panel_icons.hxx     29 Jun 2002 09:44:56 -0000      1.3
+++ panel_icons.hxx     1 Jul 2002 12:46:22 -0000       1.4
@@ -57,17 +57,17 @@
   virtual void on_click();
 };
 
-class PanelIconEdit : public PanelIcon
+class PanelIconLevelProperties : public PanelIcon
 {
 public:
-  PanelIconEdit();
+  PanelIconLevelProperties();
   virtual void on_click();
 };
 
-class PanelIconPreferences : public PanelIcon
+class PanelIconObjectProperties : public PanelIcon
 {
 public:
-  PanelIconPreferences();
+  PanelIconObjectProperties();
   virtual void on_click();
 };
 

Index: property_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/property_window.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- property_window.cxx 1 Jul 2002 09:36:13 -0000       1.4
+++ property_window.cxx 1 Jul 2002 12:46:22 -0000       1.5
@@ -26,10 +26,11 @@
 
 PropertyWindow::PropertyWindow (CL_Component* parent)
   : CL_Window (CL_Rect (0, 0, 200, 200), "Object Properties", parent),
-    current_frame (0), label (CL_Point (50, 25), "no properties available", 
this)
+    current_frame (0), label (CL_Point (50, 0), "no properties available", 
get_client_area ())
 {
   label.show (true);
   set_client_size (200, 20);
+  show (false);
 }
 
 void

Index: scroll_map.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/scroll_map.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- scroll_map.cxx      13 Jun 2002 14:25:13 -0000      1.2
+++ scroll_map.cxx      1 Jul 2002 12:46:22 -0000       1.3
@@ -72,8 +72,8 @@
 void 
 ScrollMap::draw()
 {
-  CL_Display::draw_rect (x_pos, y_pos, x_pos + width, y_pos + height,
-                        1.0f, 1.0f, 1.0f);
+  CL_Display::fill_rect (x_pos, y_pos, x_pos + width, y_pos + height,
+                        0.4f, 0.4f, 0.0f);
   Editor::instance ()->get_object_manager ()->draw (view.get ());
   /*
   int viewarea_width = (CL_Display::get_width() * width




reply via email to

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