[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor property_frame.cxx,NONE,1.1 pr
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor property_frame.cxx,NONE,1.1 property_frame.hxx,NONE,1.1 Makefile.am,1.19,1.20 groundpiece_window.cxx,1.3,1.4 groundpiece_window.hxx,1.3,1.4 property_window.cxx,1.1,1.2 property_window.hxx,1.1,1.2 |
Date: |
30 Jun 2002 22:32:29 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv24084/editor
Modified Files:
Makefile.am groundpiece_window.cxx groundpiece_window.hxx
property_window.cxx property_window.hxx
Added Files:
property_frame.cxx property_frame.hxx
Log Message:
some cleanup
--- NEW FILE: property_frame.cxx ---
// $Id: property_frame.cxx,v 1.1 2002/06/30 22:32:26 grumbel Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "property_frame.hxx"
using namespace Pingus::Editor;
PropertyFrame::PropertyFrame (int width, int height, CL_Component* parent)
: CL_Frame (CL_Rect (0, 0, width, height), parent)
{
}
/* EOF */
--- NEW FILE: property_frame.hxx ---
// $Id: property_frame.hxx,v 1.1 2002/06/30 22:32:26 grumbel Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef HEADER_PINGUS_EDITOR_PROPERTY_FRAME_HXX
#define HEADER_PINGUS_EDITOR_PROPERTY_FRAME_HXX
#include <ClanLib/gui.h>
namespace Pingus
{
namespace Editor
{
class PropertyFrame : public CL_Frame
{
private:
public:
PropertyFrame (int width, int height, CL_Component*);
};
}
}
#endif
/* EOF */
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- Makefile.am 30 Jun 2002 22:03:13 -0000 1.19
+++ Makefile.am 30 Jun 2002 22:32:26 -0000 1.20
@@ -38,6 +38,7 @@
scroll_map.cxx \
sprite_editorobj.cxx editorobj_group.hxx editorobj_group.cxx \
groundpiece_window.hxx groundpiece_window.cxx \
-property_window.hxx property_window.cxx
+property_window.hxx property_window.cxx \
+property_frame.hxx property_frame.cxx
# EOF #
Index: groundpiece_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/groundpiece_window.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- groundpiece_window.cxx 30 Jun 2002 22:03:13 -0000 1.3
+++ groundpiece_window.cxx 30 Jun 2002 22:32:26 -0000 1.4
@@ -32,7 +32,7 @@
using namespace Pingus::Editor;
GroundpieceWindow::GroundpieceWindow (CL_Component* parent,
EditorGroundpieceObj* arg_data)
- : CL_Frame (CL_Rect (0, 0, 200, 180), /* "Groundpiece Properties",*/ parent),
+ : PropertyFrame (200, 180, parent),
data (arg_data),
convert_to_hotspot_button (CL_Rect (10, 30, 190, 30 + 20), "Convert to
HotSpot", this),
@@ -42,42 +42,22 @@
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),
-
- ok_button (CL_Rect (10, 150, 90, 150 + 20), "Ok", this),
- cancel_button (CL_Rect (110, 150, 190, 150 + 20), "Cancel", this)
+ bridge_radiobutton (CL_Point (110, 120), "bridge", this)
{
- //groundtype_listbox.insert_item ("ground");
- //groundtype_listbox.insert_item ("transparent");
- //groundtype_listbox.insert_item ("bridge");
- //groundtype_listbox.insert_item ("solid");
groundtype_group.add (&ground_radiobutton);
groundtype_group.add (&transparent_radiobutton);
groundtype_group.add (&solid_radiobutton);
groundtype_group.add (&bridge_radiobutton);
- ok_button_slot = ok_button.sig_clicked ().connect (this,
&GroundpieceWindow::ok_clicked);
- cancel_button_slot = cancel_button.sig_clicked ().connect (this,
&GroundpieceWindow::cancel_clicked);
-
convert_to_hotspot_button_slot
= convert_to_hotspot_button.sig_clicked ().connect (this,
&GroundpieceWindow::convert_to_hotspot);
read_data ();
}
-void
-GroundpieceWindow::ok_clicked ()
+GroundpieceWindow::~GroundpieceWindow ()
{
- std::cout << "OK Clicked" << std::endl;
write_data ();
- show (false);
-}
-
-void
-GroundpieceWindow::cancel_clicked ()
-{
- std::cout << "Cancel Clicked" << std::endl;
- show (false);
}
void
Index: groundpiece_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/groundpiece_window.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- groundpiece_window.hxx 30 Jun 2002 22:03:13 -0000 1.3
+++ groundpiece_window.hxx 30 Jun 2002 22:32:26 -0000 1.4
@@ -20,14 +20,14 @@
#ifndef HEADER_PINGUS_EDITOR_GROUNDPIECE_WINDOW_HXX
#define HEADER_PINGUS_EDITOR_GROUNDPIECE_WINDOW_HXX
-#include <ClanLib/gui.h>
+#include "property_frame.hxx"
#include "editor_groundpiece_obj.hxx"
namespace Pingus
{
namespace Editor
{
- class GroundpieceWindow : public CL_Frame
+ class GroundpieceWindow : public PropertyFrame
{
private:
EditorGroundpieceObj* data;
@@ -43,18 +43,12 @@
CL_RadioButton solid_radiobutton;
CL_RadioButton bridge_radiobutton;
- CL_Button ok_button;
- CL_Button cancel_button;
-
- CL_Slot ok_button_slot;
- CL_Slot cancel_button_slot;
CL_Slot convert_to_hotspot_button_slot;
public:
GroundpieceWindow (CL_Component* parent, EditorGroundpieceObj* data);
+ ~GroundpieceWindow ();
- void ok_clicked ();
- void cancel_clicked ();
void convert_to_hotspot ();
void read_data ();
Index: property_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/property_window.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- property_window.cxx 30 Jun 2002 22:03:13 -0000 1.1
+++ property_window.cxx 30 Jun 2002 22:32:26 -0000 1.2
@@ -25,23 +25,30 @@
PropertyWindow::PropertyWindow (CL_Component* parent)
: CL_Window (CL_Rect (0, 0, 200, 200), "Object Properties", parent),
- current_frame (0)
+ current_frame (0), label (CL_Point (50, 25), "no properties available",
this)
{
-
+ label.show (true);
+ set_client_size (200, 20);
}
void
PropertyWindow::update_frame (boost::shared_ptr<EditorObj> obj)
{
if (current_frame)
- remove_child (current_frame);
+ {
+ remove_child (current_frame);
+ delete current_frame;
+ current_frame = 0;
+ }
if (obj.get ())
{
+ // We are responsible to delete comp
CL_Component* comp = obj->get_gui_dialog (this);
if (comp)
{
+ label.show (false);
// FIXME: This looks like a workaround for a missing feature in
// FIXME: CL_Window
comp->set_position (2, 22);
@@ -52,14 +59,16 @@
}
else
{
+ label.show (true);
std::cout << "No GUI" << std::endl;
current_frame = 0;
- set_client_size (200, 30);
+ set_client_size (200, 20);
}
}
else
{
- set_client_size (200, 30);
+ set_client_size (200, 20);
+ label.show (true);
}
}
Index: property_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/property_window.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- property_window.hxx 30 Jun 2002 22:03:13 -0000 1.1
+++ property_window.hxx 30 Jun 2002 22:32:26 -0000 1.2
@@ -32,7 +32,8 @@
{
private:
CL_Component* current_frame;
-
+ CL_Label label;
+
public:
PropertyWindow (CL_Component* parent);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor property_frame.cxx,NONE,1.1 property_frame.hxx,NONE,1.1 Makefile.am,1.19,1.20 groundpiece_window.cxx,1.3,1.4 groundpiece_window.hxx,1.3,1.4 property_window.cxx,1.1,1.2 property_window.hxx,1.1,1.2,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor property_window.cxx,NONE,1.1 property_window.hxx,NONE,1.1 Makefile.am,1.18,1.19 editor.cxx,1.11,1.12 editor.hxx,1.4,1.5 editor_event.cxx,1.14,1.15 editor_event.hxx,1.7,1.8 editor_help_screen.cxx,1.2,1.3 editorobj.hxx,1.5,1.6 entrance_window.hxx,1.1,1.2 groundpiece_window.cxx,1.2,1.3 groundpiece_window.hxx,1.2,1.3
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/data/data groundpieces-ground.scr,1.19,1.20
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor property_window.cxx,NONE,1.1 property_window.hxx,NONE,1.1 Makefile.am,1.18,1.19 editor.cxx,1.11,1.12 editor.hxx,1.4,1.5 editor_event.cxx,1.14,1.15 editor_event.hxx,1.7,1.8 editor_help_screen.cxx,1.2,1.3 editorobj.hxx,1.5,1.6 entrance_window.hxx,1.1,1.2 groundpiece_window.cxx,1.2,1.3 groundpiece_window.hxx,1.2,1.3
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/data/data groundpieces-ground.scr,1.19,1.20
- Index(es):