pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/editorobjs surface_background_obj.cxx


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editorobjs surface_background_obj.cxx,1.3,1.4 surface_background_obj.hxx,1.4,1.5
Date: 29 Nov 2002 00:17:07 -0000

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

Modified Files:
        surface_background_obj.cxx surface_background_obj.hxx 
Log Message:
added stuff to ease the creation of object property gui's


Index: surface_background_obj.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/surface_background_obj.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- surface_background_obj.cxx  27 Sep 2002 18:36:40 -0000      1.3
+++ surface_background_obj.cxx  29 Nov 2002 00:17:05 -0000      1.4
@@ -19,8 +19,13 @@
 
 #include "../string_converter.hxx"
 #include "../worldobjsdata/surface_background_data.hxx"
+#include "../editor/editor.hxx"
+#include "../editor/generic_property_frame.hxx"
+#include "../editor/property_window.hxx"
 #include "surface_background_obj.hxx"
 
+using namespace EditorNS;
+
 namespace EditorObjs {
 
 SurfaceBackgroundObj::SurfaceBackgroundObj (const 
WorldObjsData::SurfaceBackgroundData& data_)
@@ -54,6 +59,24 @@
          + to_string(data->pos.x) + ", "
          + to_string(data->pos.y) + ", "
          + to_string(data->pos.z);
+}
+
+PropertyFrame*
+SurfaceBackgroundObj::get_gui_dialog(Editor* editor)
+{
+  GenericPropertyFrame* propframe 
+    = new GenericPropertyFrame("SurfaceBackground", 
editor->get_property_window()->get_client_area());
+
+  propframe->add_float_box("Parallax-X", &data->para_x);
+  propframe->add_float_box("Parallax-Y", &data->para_y);
+
+  propframe->add_float_box("Scroll-Speed-X", &data->scroll_x);
+  propframe->add_float_box("Scroll-Speed-Y", &data->scroll_y);
+
+  propframe->add_check_box("Stretch-X", &data->stretch_x);
+  propframe->add_check_box("Stretch-Y", &data->stretch_y);
+
+  return propframe;
 }
 
 } // namespace EditorObjs

Index: surface_background_obj.hxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/surface_background_obj.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- surface_background_obj.hxx  28 Nov 2002 20:09:54 -0000      1.4
+++ surface_background_obj.hxx  29 Nov 2002 00:17:05 -0000      1.5
@@ -42,7 +42,7 @@
   EditorObj* duplicate ();
 
   std::string status_line ();
-  EditorNS::PropertyFrame* get_gui_dialog(EditorNS::Editor*) { return 0; }  
+  EditorNS::PropertyFrame* get_gui_dialog(EditorNS::Editor*);
 private:
   SurfaceBackgroundObj (const SurfaceBackgroundObj&);
   SurfaceBackgroundObj& operator= (const SurfaceBackgroundObj&);





reply via email to

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