[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor action_window.cxx,NONE,1.1 act
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor action_window.cxx,NONE,1.1 action_window.hxx,NONE,1.1 entrance_window.cxx,NONE,1.1 entrance_window.hxx,NONE,1.1 exit_window.cxx,NONE,1.1 exit_window.hxx,NONE,1.1 groundpiece_window.cxx,NONE,1.1 groundpiece_window.hxx,NONE,1.1 Makefile.am,1.15,1.16 editor.cxx,1.6,1.7 object_manager.cxx,1.10,1.11 object_manager.hxx,1.4,1.5 |
Date: |
28 Jun 2002 22:22:01 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv20083/src/editor
Modified Files:
Makefile.am editor.cxx object_manager.cxx object_manager.hxx
Added Files:
action_window.cxx action_window.hxx entrance_window.cxx
entrance_window.hxx exit_window.cxx exit_window.hxx
groundpiece_window.cxx groundpiece_window.hxx
Log Message:
- added some primitve gui support
--- NEW FILE: action_window.cxx ---
// $Id: action_window.cxx,v 1.1 2002/06/28 22:21:59 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 "../string_converter.hxx"
#include "action_window.hxx"
/**********************
Actions
----------------------
Basher 20 [+][-]
Bridger 20 [+][-]
Digger 20 [+][-]
[...]
----------------------
[ok] [cancel]
**********************/
ActionWindow::ActionWindow (CL_Component* parent, std::vector<ActionData>*
arg_actions)
: actions (arg_actions)
{
window = new CL_Window (CL_Rect(200, 30,
400, (actions->size() * 30) + 30), "Pingus
Actions", parent);
int y = 30;
for (std::vector<ActionData>::iterator i = actions->begin (); i !=
actions->end (); ++i)
{
inputs.push_back(new CL_InputBox (CL_Rect(100, y, 190, 0),
to_string(i->number_of), window));
labels.push_back(new CL_Label (CL_Point(10, y),
action_to_string(i->name), window));
y += 20;
}
}
void
ActionWindow::on_close ()
{
// Sync the level data with the data from the window
}
/* EOF */
--- NEW FILE: action_window.hxx ---
// $Id: action_window.hxx,v 1.1 2002/06/28 22:21:59 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_ACTION_WINDOW_HXX
#define HEADER_PINGUS_EDITOR_ACTION_WINDOW_HXX
#include <ClanLib/gui.h>
#include <vector>
#include "../action_data.hxx"
class ActionWindow
{
private:
std::vector<ActionData>* actions;
CL_Window* window;
std::vector<CL_InputBox*> inputs;
std::vector<CL_Label*> labels;
public:
ActionWindow (CL_Component* parent, std::vector<ActionData>*);
private:
void on_close ();
};
#endif
/* EOF */
--- NEW FILE: entrance_window.cxx ---
// $Id: entrance_window.cxx,v 1.1 2002/06/28 22:21:59 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 "entrance_window.hxx"
/**********************************
Entrance Properties
----------------------------------
Direction: [left|right|none]
Release Rate: 30
OwnerId: [player1|player2|...]
----------------------------------
[ok] [cancel]
***********************************/
/* EOF */
--- NEW FILE: entrance_window.hxx ---
// $Id: entrance_window.hxx,v 1.1 2002/06/28 22:21:59 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_ENTRANCE_WINDOW_HXX
#define HEADER_PINGUS_EDITOR_ENTRANCE_WINDOW_HXX
namespace Pingus
{
namespace Editor
{
class EntranceWindow
{
private:
public:
};
}
}
#endif
/* EOF */
--- NEW FILE: exit_window.cxx ---
// $Id: exit_window.cxx,v 1.1 2002/06/28 22:21:59 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 "exit_window.hxx"
/**********************************
Exit Properties
----------------------------------
OwnerId: [player1|player2|...]
----------------------------------
[ok] [cancel]
***********************************/
/* EOF */
--- NEW FILE: exit_window.hxx ---
// $Id: exit_window.hxx,v 1.1 2002/06/28 22:21:59 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_EXIT_WINDOW_HXX
#define HEADER_PINGUS_EDITOR_EXIT_WINDOW_HXX
class ExitWindow
{
private:
public:
};
#endif
/* EOF */
--- NEW FILE: groundpiece_window.cxx ---
// $Id: groundpiece_window.cxx,v 1.1 2002/06/28 22:21:59 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 "groundpiece_window.hxx"
/************************
Groundpiece Properties
------------------------
[convert to hotspot]
Type: [ground|bridger|transparent|...]
------------------------
[ok] [cancel]
*************************/
/* EOF */
--- NEW FILE: groundpiece_window.hxx ---
// $Id: groundpiece_window.hxx,v 1.1 2002/06/28 22:21:59 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_GROUNDPIECE_WINDOW_HXX
#define HEADER_PINGUS_EDITOR_GROUNDPIECE_WINDOW_HXX
namespace Pingus
{
namespace Editor
{
class GroundpieceWindow
{
private:
public:
};
}
}
#endif
/* EOF */
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Makefile.am 12 Jun 2002 19:11:31 -0000 1.15
+++ Makefile.am 28 Jun 2002 22:21:59 -0000 1.16
@@ -20,6 +20,7 @@
EXTRA_DIST = EditorObjGroupData.hh EditorObjGroupData.cc
libpingus_editor_a_SOURCES = \
+action_window.cxx action_window.hxx \
editor.hxx object_manager.hxx start_pos.hxx \
editor_event.hxx object_selector.hxx status_line.hxx \
editor_groundpiece_obj.hxx panel.hxx string_reader.hxx \
Index: editor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- editor.cxx 25 Jun 2002 14:54:01 -0000 1.6
+++ editor.cxx 28 Jun 2002 22:21:59 -0000 1.7
@@ -20,6 +20,8 @@
#include <cstdio>
#include <string>
+#include <ClanLib/gui.h>
+
#include <ClanLib/Core/System/system.h>
#include <ClanLib/Core/Math/rect.h>
#include <ClanLib/Display/Display/display.h>
@@ -43,6 +45,7 @@
#include "status_line.hxx"
#include "object_selector.hxx"
#include "object_manager.hxx"
+#include "action_window.hxx"
Editor* Editor::instance_ = 0;
@@ -140,6 +143,16 @@
register_event_handler();
+ CL_StyleManager_Default* style_manager;
+ CL_GUIManager* gui;
+
+ CL_ResourceManager gui_resources("../data/data/gui.scr", false);
+
+ style_manager = new CL_StyleManager_Default (&gui_resources);
+ gui = new CL_GUIManager (style_manager);
+
+ ActionWindow window (gui, object_manager->get_actions ());
+
while (!quit)
{
// FIXME: This busy loop should be replaced by redraw events
@@ -147,6 +160,7 @@
CL_System::keep_alive();
move_objects();
draw();
+ gui->show ();
Display::flip_display(true);
}
Index: object_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- object_manager.cxx 28 Jun 2002 17:03:38 -0000 1.10
+++ object_manager.cxx 28 Jun 2002 22:21:59 -0000 1.11
@@ -525,4 +525,10 @@
}
}
+std::vector<ActionData>*
+ObjectManager::get_actions ()
+{
+ return &actions;
+}
+
/* EOF */
Index: object_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- object_manager.hxx 24 Jun 2002 23:31:24 -0000 1.4
+++ object_manager.hxx 28 Jun 2002 22:21:59 -0000 1.5
@@ -124,6 +124,8 @@
/** Add the object at the given position to the selection */
boost::shared_ptr<EditorObj> select_object(const CL_Vector & pos);
+
+ std::vector<ActionData>* get_actions ();
};
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor action_window.cxx,NONE,1.1 action_window.hxx,NONE,1.1 entrance_window.cxx,NONE,1.1 entrance_window.hxx,NONE,1.1 exit_window.cxx,NONE,1.1 exit_window.hxx,NONE,1.1 groundpiece_window.cxx,NONE,1.1 groundpiece_window.hxx,NONE,1.1 Makefile.am,1.15,1.16 editor.cxx,1.6,1.7 object_manager.cxx,1.10,1.11 object_manager.hxx,1.4,1.5,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src generic_main.cxx,1.1,1.2
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/data/levels desert6-grumbel.xml,NONE,1.1 hellmouth17-grumbel.xml,NONE,1.1
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src generic_main.cxx,1.1,1.2
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/data/levels desert6-grumbel.xml,NONE,1.1 hellmouth17-grumbel.xml,NONE,1.1
- Index(es):