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 editor_event.cxx,1.23,1.24 lev


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.23,1.24 level_property_window.cxx,1.3,1.4 level_property_window.hxx,1.3,1.4 object_manager.cxx,1.21,1.22 object_manager.hxx,1.13,1.14
Date: 2 Jul 2002 16:06:53 -0000

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

Modified Files:
        editor_event.cxx level_property_window.cxx 
        level_property_window.hxx object_manager.cxx 
        object_manager.hxx 
Log Message:
- level property window now gets the correct values (writeback not implemented
- floater -> jumper fix
- marked a few files as not compilable

Index: editor_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- editor_event.cxx    2 Jul 2002 13:36:06 -0000       1.23
+++ editor_event.cxx    2 Jul 2002 16:06:51 -0000       1.24
@@ -389,8 +389,8 @@
       if (group)
        {      
          std::vector<EditorObj*>* objs = group->get_objs();
-         object_manager->erase (*objs);
          selection->clear();
+
          for(std::vector<EditorObj*>::iterator i = objs->begin();
              i != objs->end();
              i++)

Index: level_property_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/level_property_window.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- level_property_window.cxx   1 Jul 2002 16:31:40 -0000       1.3
+++ level_property_window.cxx   2 Jul 2002 16:06:51 -0000       1.4
@@ -45,44 +45,59 @@
 
 using namespace Pingus::Editor;
 
-LevelPropertyWindow::LevelPropertyWindow (CL_Component* parent, ObjectManager* 
manager)
-  : CL_Window (CL_Rect (0, 0, 200, 300), "Level Properties", parent),
+LevelPropertyWindow::LevelPropertyWindow (CL_Component* parent, ObjectManager* 
manager_)
+  : CL_Window (CL_Rect (0, 0, 400, 300), "Level Properties", parent),
+    manager (manager_),
     levelname_label (CL_Rect (10, 10, 90, 30), "Levelname", get_client_area 
()),
-    levelname_input (CL_Rect(110, 10, 190, 30), "bla", get_client_area ()),
+    levelname_input (CL_Rect(110, 10, 390, 30), manager->get_levelname (), 
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 
()),
+    description_input(CL_Rect(110, 30, 390, 50), manager->get_description (), 
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 ()),
+    author_input (CL_Rect(110, 50, 390, 70), manager->get_author (), 
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 ()),
+    number_of_pingus_label (CL_Rect (10, 70, 110, 90), "Number of Pingus", 
get_client_area ()),
+    number_of_pingus_input (CL_Rect(110, 70, 390, 90), to_string 
(manager->get_number_of_pingus ()),
+                           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 ()),
+    pingus_to_save_input (CL_Rect(110, 90, 390, 110), to_string 
(manager->get_number_to_save ()),
+                         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 
()),
+    time_input (CL_Rect(110, 110, 390, 130), to_string (manager->get_leveltime 
()), 
+               get_client_area ()),
 
     width_label (CL_Rect (10, 130, 90, 150), "Width", get_client_area ()),
-    width_input (CL_Rect(110, 130, 190, 150), to_string(manager->get_width 
()), get_client_area ()),    
+    width_input (CL_Rect(110, 130, 390, 150), to_string(manager->get_width 
()), get_client_area ()),    
 
     height_label (CL_Rect (10, 150, 90, 170), "Height", get_client_area ()),
-    height_input (CL_Rect(110, 150, 190, 170), to_string(manager->get_height 
()), get_client_area ()), 
+    height_input (CL_Rect(110, 150, 390, 170), to_string(manager->get_height 
()), get_client_area ()), 
 
     difficulty_label (CL_Rect (10, 170, 90, 190), "Difficulty", 
get_client_area ()),
-    difficulty_input (CL_Rect(110, 170, 190, 190), to_string (50), 
get_client_area ()),
+    difficulty_input (CL_Rect(110, 170, 390, 190), to_string 
(manager->get_difficulty ()), 
+                     get_client_area ()),
 
     comment_label (CL_Rect(10, 190, 90, 210), "Comment", get_client_area ()),
     playable_checkbox (CL_Point(10, 210), "Playable", get_client_area ())
-{  
+{
+  if (manager->get_playable ())
+    playable_checkbox.set_checked (true);
+  else
+    playable_checkbox.set_checked (false);
+
+  levelname_input.set_read_only (true);
+  description_input.set_read_only (true);
+  
   show (false);
 }
 
 LevelPropertyWindow::~LevelPropertyWindow ()
 {
   
+
+  manager->set_playable (playable_checkbox.is_checked ());
 }
 
 /* EOF */

Index: level_property_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/level_property_window.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- level_property_window.hxx   1 Jul 2002 16:31:40 -0000       1.3
+++ level_property_window.hxx   2 Jul 2002 16:06:51 -0000       1.4
@@ -31,11 +31,13 @@
     class LevelPropertyWindow : public CL_Window
     {
     private:
+      ObjectManager* manager;
+
       CL_Label    levelname_label;
       CL_InputBox levelname_input;
 
       CL_Label    descritpion_label;
-      //CL_InputBox description_input;
+      CL_InputBox description_input;
 
       CL_Label    author_label;
       CL_InputBox author_input;

Index: object_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- object_manager.cxx  2 Jul 2002 13:36:06 -0000       1.21
+++ object_manager.cxx  2 Jul 2002 16:06:51 -0000       1.22
@@ -359,4 +359,16 @@
   return &actions;
 }
 
+void
+ObjectManager::set_width(int arg_width)
+{
+  width = arg_width;
+}
+
+void
+ObjectManager::set_height(int arg_height)
+{
+  height = arg_height;
+}
+
 /* EOF */

Index: object_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- object_manager.hxx  2 Jul 2002 13:36:07 -0000       1.13
+++ object_manager.hxx  2 Jul 2002 16:06:51 -0000       1.14
@@ -82,8 +82,45 @@
 
   std::vector<EditorObj*> rect_get_objs(int x1, int y1, int x2, int y2);
 
+  /** FIXME: translation must be handled otherwise */
+  std::string get_levelname () { return levelname["en"]; }
+  std::string get_description () { return description["en"]; }
+
+  // Get and Setter functions
   int get_width() { return width; }
   int get_height() { return height; }
+
+  void set_width(int arg_width);
+  void set_height(int arg_height);
+
+  int get_number_to_save () { return number_to_save; }
+  void set_number_to_save (int num) { number_to_save = num; }
+
+  int get_number_of_pingus () { return number_of_pingus; }
+  void set_number_of_pingus (int num) { number_of_pingus = num; }
+    
+  void set_leveltime (int num) { level_time = num; }
+  int get_leveltime () { return level_time; }
+
+  int get_difficulty () { return difficulty; }
+  void set_difficulty (int num) { difficulty = num; }
+
+  void set_playable (bool a) { playable = a; }
+  bool get_playable () { return playable; }
+
+  std::string get_author () { return author; }
+  void set_author (std::string a) { author = a; }
+
+  /** Return the currently selected object, if none is selected or
+      multiple objects are selected return 0 */
+  //boost::shared_ptr<EditorObj> get_current_obj();
+  
+  //void move_current_objs(float x, float y);
+  //void drag_current_objs ();
+  //void drop_current_objs ();
+
+  //void add_to_selection(boost::shared_ptr<EditorObj> obj);
+  //void add_to_selection(std::vector<boost::shared_ptr<EditorObj> > objs);
 
   bool raise_obj(EditorObj* obj);
   bool lower_obj(EditorObj* obj);




reply via email to

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