[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.20,1.21 editor_g
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.20,1.21 editor_groundpiece_obj.cxx,1.6,1.7 editor_groundpiece_obj.hxx,1.5,1.6 editorobj.cxx,1.2,1.3 editorobj.hxx,1.6,1.7 entrance_window.cxx,1.1,1.2 entrance_window.hxx,1.2,1.3 groundpiece_window.cxx,1.4,1.5 groundpiece_window.hxx,1.4,1.5 plfobj.cxx,1.3,1.4 plfobj.hxx,1.3,1.4 property_frame.hxx,1.1,1.2 property_window.cxx,1.2,1.3 |
Date: |
1 Jul 2002 09:09:34 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv25446/editor
Modified Files:
Makefile.am editor_groundpiece_obj.cxx
editor_groundpiece_obj.hxx editorobj.cxx editorobj.hxx
entrance_window.cxx entrance_window.hxx groundpiece_window.cxx
groundpiece_window.hxx plfobj.cxx plfobj.hxx
property_frame.hxx property_window.cxx
Log Message:
added property_frame for entrances
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- Makefile.am 30 Jun 2002 22:32:26 -0000 1.20
+++ Makefile.am 1 Jul 2002 09:09:31 -0000 1.21
@@ -39,6 +39,7 @@
sprite_editorobj.cxx editorobj_group.hxx editorobj_group.cxx \
groundpiece_window.hxx groundpiece_window.cxx \
property_window.hxx property_window.cxx \
-property_frame.hxx property_frame.cxx
+property_frame.hxx property_frame.cxx \
+entrance_window.hxx entrance_window.cxx
# EOF #
Index: editor_groundpiece_obj.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/editor/editor_groundpiece_obj.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- editor_groundpiece_obj.cxx 29 Jun 2002 11:54:22 -0000 1.6
+++ editor_groundpiece_obj.cxx 1 Jul 2002 09:09:31 -0000 1.7
@@ -97,7 +97,7 @@
pos.y -= sprite.get_height ()/2;
}
-CL_Component*
+Pingus::Editor::PropertyFrame*
EditorGroundpieceObj::get_gui_dialog(CL_Component* parent)
{
return new Pingus::Editor::GroundpieceWindow (parent, this);
Index: editor_groundpiece_obj.hxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/editor/editor_groundpiece_obj.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- editor_groundpiece_obj.hxx 29 Jun 2002 11:54:22 -0000 1.5
+++ editor_groundpiece_obj.hxx 1 Jul 2002 09:09:31 -0000 1.6
@@ -46,7 +46,7 @@
boost::shared_ptr<EditorObj> duplicate();
std::string status_line();
- CL_Component* get_gui_dialog(CL_Component* parent);
+ Pingus::Editor::PropertyFrame* get_gui_dialog(CL_Component* parent);
};
#endif
Index: editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- editorobj.cxx 29 Jun 2002 11:54:22 -0000 1.2
+++ editorobj.cxx 1 Jul 2002 09:09:31 -0000 1.3
@@ -35,7 +35,7 @@
return "EditorObj::status_line(): Not implemented";
}
-CL_Component*
+Pingus::Editor::PropertyFrame*
EditorObj::get_gui_dialog (CL_Component*)
{
return 0;
Index: editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- editorobj.hxx 30 Jun 2002 22:03:13 -0000 1.6
+++ editorobj.hxx 1 Jul 2002 09:09:31 -0000 1.7
@@ -31,6 +31,14 @@
class CL_Component;
class Editor;
+namespace Pingus
+{
+ namespace Editor
+ {
+ class PropertyFrame;
+ }
+}
+
namespace boost {
template <class T> class shared_ptr;
}
@@ -114,7 +122,7 @@
responsible for deleting the object after usage. The
CL_Component* should/must be a CL_Frame so that it can get
embedded in the properties window */
- virtual CL_Component* get_gui_dialog (CL_Component* parent);
+ virtual Pingus::Editor::PropertyFrame* get_gui_dialog (CL_Component* parent);
};
#endif
Index: entrance_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/entrance_window.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- entrance_window.cxx 28 Jun 2002 22:21:59 -0000 1.1
+++ entrance_window.cxx 1 Jul 2002 09:09:31 -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 "plfobj.hxx"
+#include "../string_converter.hxx"
#include "entrance_window.hxx"
/**********************************
@@ -28,5 +30,49 @@
----------------------------------
[ok] [cancel]
***********************************/
+
+using namespace Pingus::Editor;
+
+EntranceWindow::EntranceWindow (CL_Component* parent, EntranceObj* obj)
+ : PropertyFrame (200, 100, parent),
+ entrance (obj),
+ direction_label (CL_Rect (10, 10, 90, 30), "Direction", this),
+ direction_left (CL_Point (110, 10), "left", this),
+ direction_misc (CL_Point (110, 30), "misc", this),
+ direction_right (CL_Point (110, 50), "right", this),
+ release_rate_label (CL_Rect (10, 70, 90,90), "Release Rate", this),
+ release_rate_input (CL_Rect (110, 70, 190, 90), "30", this)
+{
+ direction_group.add (&direction_left);
+ direction_group.add (&direction_misc);
+ direction_group.add (&direction_right);
+
+ switch (entrance->direction)
+ {
+ case EntranceData::LEFT:
+ direction_left.set_checked (true);
+ break;
+ case EntranceData::MISC:
+ direction_misc.set_checked (true);
+ break;
+ case EntranceData::RIGHT:
+ direction_right.set_checked (true);
+ break;
+ }
+
+ release_rate_input.set_text (to_string (entrance->release_rate));
+}
+
+EntranceWindow::~EntranceWindow ()
+{
+ if (direction_left.is_checked ())
+ entrance->direction = EntranceData::LEFT;
+ else if (direction_misc.is_checked ())
+ entrance->direction = EntranceData::MISC;
+ else if (direction_right.is_checked ())
+ entrance->direction = EntranceData::RIGHT;
+
+ from_string(release_rate_input.get_text (), entrance->release_rate);
+}
/* EOF */
Index: entrance_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/entrance_window.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- entrance_window.hxx 30 Jun 2002 22:03:13 -0000 1.2
+++ entrance_window.hxx 1 Jul 2002 09:09:31 -0000 1.3
@@ -20,15 +20,35 @@
#ifndef HEADER_PINGUS_EDITOR_ENTRANCE_WINDOW_HXX
#define HEADER_PINGUS_EDITOR_ENTRANCE_WINDOW_HXX
-namespace Editor
+#include "property_frame.hxx"
+
+class EntranceObj;
+
+namespace Pingus
{
- class EntranceWindow : public CL_Window
+ namespace Editor
{
- private:
-
- public:
- EntranceWindow ();
- };
+ class EntranceWindow : public PropertyFrame
+ {
+ private:
+ EntranceObj* entrance;
+
+ CL_Label direction_label;
+ CL_RadioGroup direction_group;
+ CL_RadioButton direction_left;
+ CL_RadioButton direction_misc;
+ CL_RadioButton direction_right;
+
+ CL_Label release_rate_label;
+ CL_InputBox release_rate_input;
+
+ public:
+ EntranceWindow (CL_Component* parent, EntranceObj* );
+ ~EntranceWindow ();
+
+ std::string get_title () { return "Entrance Properties"; }
+ };
+ }
}
#endif
Index: groundpiece_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/groundpiece_window.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- groundpiece_window.cxx 30 Jun 2002 22:32:26 -0000 1.4
+++ groundpiece_window.cxx 1 Jul 2002 09:09:31 -0000 1.5
@@ -22,9 +22,9 @@
/************************
Groundpiece Properties
------------------------
- [convert to hotspot]
-
Type: [ground|bridger|transparent|...]
+
+ [convert to hotspot]
------------------------
[ok] [cancel]
*************************/
@@ -32,17 +32,17 @@
using namespace Pingus::Editor;
GroundpieceWindow::GroundpieceWindow (CL_Component* parent,
EditorGroundpieceObj* arg_data)
- : PropertyFrame (200, 180, parent),
+ : PropertyFrame (200, 120, parent),
data (arg_data),
- convert_to_hotspot_button (CL_Rect (10, 30, 190, 30 + 20), "Convert to
HotSpot", this),
+ convert_to_hotspot_button (CL_Rect (10, 90, 190, 90 + 20), "Convert to
HotSpot", this),
- groundtype_label (CL_Rect (10, 60, 90, 60 + 20), "Groundtype", this),
+ groundtype_label (CL_Rect (10, 10, 90, 10 + 20), "Groundtype", this),
//groundtype_listbox (CL_Rect (110, 60, 190, 60 + 60), this),
- ground_radiobutton (CL_Point (110, 60), "ground", this),
- transparent_radiobutton (CL_Point (110, 80), "transparent", this),
- solid_radiobutton (CL_Point (110, 100), "solid", this),
- bridge_radiobutton (CL_Point (110, 120), "bridge", this)
+ ground_radiobutton (CL_Point (110, 10), "ground", this),
+ transparent_radiobutton (CL_Point (110, 30), "transparent", this),
+ solid_radiobutton (CL_Point (110, 50), "solid", this),
+ bridge_radiobutton (CL_Point (110, 70), "bridge", this)
{
groundtype_group.add (&ground_radiobutton);
groundtype_group.add (&transparent_radiobutton);
Index: groundpiece_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/groundpiece_window.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- groundpiece_window.hxx 30 Jun 2002 22:32:26 -0000 1.4
+++ groundpiece_window.hxx 1 Jul 2002 09:09:31 -0000 1.5
@@ -53,6 +53,8 @@
void read_data ();
void write_data ();
+
+ std::string get_title () { return "Groundpiece Properties"; }
};
}
}
Index: plfobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plfobj.cxx 20 Jun 2002 11:13:02 -0000 1.3
+++ plfobj.cxx 1 Jul 2002 09:09:31 -0000 1.4
@@ -22,6 +22,7 @@
#include "../boost/smart_ptr.hpp"
#include "editor_view.hxx"
#include "plfobj.hxx"
+#include "entrance_window.hxx"
using namespace std;
@@ -87,6 +88,14 @@
type.c_str(), release_rate, dir_str.c_str(), owner_id);
return std::string(str);
+}
+
+Pingus::Editor::PropertyFrame*
+EntranceObj::get_gui_dialog (CL_Component* parent)
+{
+ // FIXME: due to the shared_ptr<> this is not guaranted to stay here
+ // FIXME: long enough
+ return new Pingus::Editor::EntranceWindow (parent, this);
}
ExitObj::ExitObj(const ExitData& data)
Index: plfobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plfobj.hxx 25 Jun 2002 12:20:33 -0000 1.3
+++ plfobj.hxx 1 Jul 2002 09:09:31 -0000 1.4
@@ -40,6 +40,7 @@
boost::shared_ptr<EditorObj> duplicate();
void write_xml(std::ostream& xml) { EntranceData::write_xml (xml); }
std::string status_line();
+ Pingus::Editor::PropertyFrame* get_gui_dialog (CL_Component* parent);
};
///
Index: property_frame.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/property_frame.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- property_frame.hxx 30 Jun 2002 22:32:26 -0000 1.1
+++ property_frame.hxx 1 Jul 2002 09:09:31 -0000 1.2
@@ -32,6 +32,8 @@
public:
PropertyFrame (int width, int height, CL_Component*);
+
+ virtual std::string get_title () =0;
};
}
}
Index: property_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/property_window.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- property_window.cxx 30 Jun 2002 22:32:26 -0000 1.2
+++ property_window.cxx 1 Jul 2002 09:09:31 -0000 1.3
@@ -19,6 +19,7 @@
#include "../boost/smart_ptr.hpp"
#include "editorobj.hxx"
+#include "property_frame.hxx"
#include "property_window.hxx"
using namespace Pingus::Editor;
@@ -44,10 +45,11 @@
if (obj.get ())
{
// We are responsible to delete comp
- CL_Component* comp = obj->get_gui_dialog (this);
+ Pingus::Editor::PropertyFrame* comp = obj->get_gui_dialog (this);
if (comp)
{
+ set_title(comp->get_title ());
label.show (false);
// FIXME: This looks like a workaround for a missing feature in
// FIXME: CL_Window
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.20,1.21 editor_groundpiece_obj.cxx,1.6,1.7 editor_groundpiece_obj.hxx,1.5,1.6 editorobj.cxx,1.2,1.3 editorobj.hxx,1.6,1.7 entrance_window.cxx,1.1,1.2 entrance_window.hxx,1.2,1.3 groundpiece_window.cxx,1.4,1.5 groundpiece_window.hxx,1.4,1.5 plfobj.cxx,1.3,1.4 plfobj.hxx,1.3,1.4 property_frame.hxx,1.1,1.2 property_window.cxx,1.2,1.3,
grumbel <=