[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs groundpiece_obj.cxx,1.7,1.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs groundpiece_obj.cxx,1.7,1.8 surface_background_obj.cxx,1.5,1.6 surface_background_obj.hxx,1.5,1.6 |
Date: |
30 Nov 2002 15:06:34 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editorobjs
In directory dark:/tmp/cvs-serv21128/editorobjs
Modified Files:
groundpiece_obj.cxx surface_background_obj.cxx
surface_background_obj.hxx
Log Message:
- added buttons and enums to the GenericPropertyFrame
Index: groundpiece_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/groundpiece_obj.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- groundpiece_obj.cxx 30 Nov 2002 00:10:29 -0000 1.7
+++ groundpiece_obj.cxx 30 Nov 2002 15:06:32 -0000 1.8
@@ -23,7 +23,9 @@
#include "../worldobjsdata/groundpiece_data.hxx"
#include "../pingus_resource.hxx"
#include "../editor/property_window.hxx"
+#include "../editor/generic_property_frame.hxx"
#include "../editor/editor.hxx"
+#include "../groundtype.hxx"
#include "groundpiece_obj.hxx"
namespace EditorObjs {
@@ -117,10 +119,61 @@
data->pos.y -= sprite.get_height()/2;
}
+struct GroundpieceObjRotate {
+ GroundpieceObj* obj;
+ GroundpieceObjRotate(GroundpieceObj* o)
+ {
+ obj = o;
+ }
+
+ void operator()() {
+ obj->rotate_90();
+ }
+};
+
+struct GroundpieceObjFlipHorizontal {
+ GroundpieceObj* obj;
+ GroundpieceObjFlipHorizontal(GroundpieceObj* o)
+ {
+ obj = o;
+ }
+
+ void operator()() {
+ obj->horizontal_flip();
+ }
+};
+
+struct GroundpieceObjFlipVertical {
+ GroundpieceObj* obj;
+ GroundpieceObjFlipVertical(GroundpieceObj* o)
+ {
+ obj = o;
+ }
+
+ void operator()() {
+ obj->vertical_flip();
+ }
+};
+
EditorNS::PropertyFrame*
-GroundpieceObj::get_gui_dialog (EditorNS::Editor* parent)
+GroundpieceObj::get_gui_dialog (EditorNS::Editor* editor)
{
- return new
EditorNS::GroundpieceWindow(parent->get_property_window()->get_client_area(),
this);
+ EditorNS::GenericPropertyFrame* propframe
+ = new EditorNS::GenericPropertyFrame("GroundPiece Properties",
+
editor->get_property_window()->get_client_area());
+
+ propframe->begin_add_enum_box("Groundtype:", (int*)&data->gptype);
+ propframe->add_enum_value("Ground", Groundtype::GP_GROUND);
+ propframe->add_enum_value("Transparent", Groundtype::GP_TRANSPARENT);
+ propframe->add_enum_value("Solid", Groundtype::GP_SOLID);
+ propframe->add_enum_value("Bridge", Groundtype::GP_BRIDGE);
+ propframe->end_add_enum_box();
+
+ propframe->add_button_box("Rotate 90", GroundpieceObjRotate(this));
+ propframe->add_button_box("Flip Vertical",
GroundpieceObjFlipVertical(this));
+ propframe->add_button_box("Flip Horizontal",
GroundpieceObjFlipHorizontal(this));
+
+ return propframe;
}
} // namespace EditorObjs
Index: surface_background_obj.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/editorobjs/surface_background_obj.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- surface_background_obj.cxx 30 Nov 2002 00:10:29 -0000 1.5
+++ surface_background_obj.cxx 30 Nov 2002 15:06:32 -0000 1.6
@@ -17,6 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#include <iostream>
#include "../string_converter.hxx"
#include "../worldobjsdata/surface_background_data.hxx"
#include "../editor/editor.hxx"
@@ -80,6 +81,8 @@
propframe->add_float_box("Color Green", &data->color.green);
propframe->add_float_box("Color Blue", &data->color.blue);
propframe->add_float_box("Color Alpha", &data->color.alpha);
+
+ //propframe->add_button_box("Hello World", Functor);
return propframe;
}
Index: surface_background_obj.hxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/editorobjs/surface_background_obj.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- surface_background_obj.hxx 29 Nov 2002 00:17:05 -0000 1.5
+++ surface_background_obj.hxx 30 Nov 2002 15:06:32 -0000 1.6
@@ -43,6 +43,7 @@
std::string status_line ();
EditorNS::PropertyFrame* get_gui_dialog(EditorNS::Editor*);
+
private:
SurfaceBackgroundObj (const SurfaceBackgroundObj&);
SurfaceBackgroundObj& operator= (const SurfaceBackgroundObj&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editorobjs groundpiece_obj.cxx,1.7,1.8 surface_background_obj.cxx,1.5,1.6 surface_background_obj.hxx,1.5,1.6,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs groundpiece_obj.cxx,1.6,1.7 groundpiece_obj.hxx,1.3,1.4 surface_background_obj.cxx,1.4,1.5
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor generic_property_frame.cxx,1.1,1.2 generic_property_frame.hxx,1.1,1.2 level_resizer.cxx,1.1,1.2 property_window.cxx,1.12,1.13 property_window.hxx,1.9,1.10
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs groundpiece_obj.cxx,1.6,1.7 groundpiece_obj.hxx,1.3,1.4 surface_background_obj.cxx,1.4,1.5
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor generic_property_frame.cxx,1.1,1.2 generic_property_frame.hxx,1.1,1.2 level_resizer.cxx,1.1,1.2 property_window.cxx,1.12,1.13 property_window.hxx,1.9,1.10
- Index(es):