[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.47,1.48 editor_ev
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.47,1.48 editor_event.cxx,1.54,1.55 editor_view.cxx,1.6,1.7 object_selector.cxx,1.36,1.37 |
Date: |
30 Mar 2003 13:12:37 -0000 |
Update of /var/lib/cvs/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv7109/src/editor
Modified Files:
editor.cxx editor_event.cxx editor_view.cxx
object_selector.cxx
Log Message:
- show editor help screen at startup, but only for the first time
- added solid-tutorial level
- added descriptions for all levels
- removed some more useless std::cout's
- added scrollwheel support, doesn't use the input/ stuff, since it was
easier this way
- added some keyboard shortcuts for result/start screen
- added clanlib patches
Index: editor.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- editor.cxx 28 Mar 2003 12:06:32 -0000 1.47
+++ editor.cxx 30 Mar 2003 13:12:35 -0000 1.48
@@ -44,6 +44,7 @@
#include "level_property_window.hxx"
#include "editor.hxx"
#include "../path_manager.hxx"
+#include "../stat_manager.hxx"
#include "editor_view.hxx"
#include <cstdio>
@@ -71,11 +72,14 @@
Editor::deinit()
{
delete instance_;
+ instance_ = 0;
}
Editor::Editor () : event_handler_ref_counter(0),
- move_x(0), move_y(0), show_help_screen(false),
tool(SELECTOR_TOOL)
+ move_x(0), move_y(0), show_help_screen(true),
tool(SELECTOR_TOOL)
{
+ StatManager::instance()->get_bool("show-editor-help-screen",
show_help_screen);
+
EditorObj::set_editor(this);
event = new EditorEvent;
@@ -106,14 +110,15 @@
panel->set_editor(this);
scroll_map->editor_event = event;
- std::cout << "Editor: registering event handler" << event << "... " <<
std::flush;
+ //std::cout << "Editor: registering event handler" << event << "... " <<
std::flush;
on_button_press_slot = CL_Input::sig_button_press ().connect(event,
&EditorEvent::on_button_press);
on_button_release_slot = CL_Input::sig_button_release ().connect(event,
&EditorEvent::on_button_release);
}
Editor::~Editor ()
{
- std::cout << "Editor: unregistering event handler" << event << "... " <<
std::flush;
+ StatManager::instance()->set_bool("show-editor-help-screen",
show_help_screen);
+
CL_Input::sig_button_press ().disconnect (on_button_press_slot);
CL_Input::sig_button_release ().disconnect (on_button_release_slot);
@@ -129,7 +134,6 @@
void
Editor::on_startup ()
{
- std::cout << "Editor::on_startup ()" << std::endl;
PingusSound::stop_music();
Display::set_cursor(CL_MouseCursorProvider::load("cursors/cursor",
PingusResource::get("core")));
Display::show_cursor();
@@ -139,7 +143,6 @@
void
Editor::on_shutdown ()
{
- std::cout << "Editor::on_shutdown ()" << std::endl;
Display::hide_cursor();
event->disable ();
}
@@ -164,7 +167,7 @@
else
{
property_window->update_frame(0);
- std::cout << "EditorEvent::editor_show_object_properties (): error:
multiple objects selected" << std::endl;
+ //std::cout << "EditorEvent::editor_show_object_properties (): error:
multiple objects selected" << std::endl;
}
}
Index: editor_event.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- editor_event.cxx 25 Mar 2003 23:15:23 -0000 1.54
+++ editor_event.cxx 30 Mar 2003 13:12:35 -0000 1.55
@@ -89,7 +89,7 @@
{
assert (is_enabled == false);
- std::cout << "EditorEvent::enable()" << std::endl;
+ //std::cout << "EditorEvent::enable()" << std::endl;
is_enabled = true;
editor->get_gui_manager ()->enable_input ();
}
@@ -99,7 +99,7 @@
{
assert (is_enabled == true);
- std::cout << "EditorEvent::disable()" << std::endl;
+ //std::cout << "EditorEvent::disable()" << std::endl;
is_enabled = false;
editor->get_gui_manager ()->disable_input ();
}
@@ -646,11 +646,11 @@
try
{
disable();
- std::cout << "Object selector on" <<std::endl;
+ //std::cout << "Object selector on" <<std::endl;
editor->object_selector->get_obj(object_manager,
int(editor->view->get_offset ().x +
CL_Display::get_width ()/2),
int(editor->view->get_offset ().y +
CL_Display::get_height ()/2));
- std::cout << "Object selector off" << std::endl;
+ //std::cout << "Object selector off" << std::endl;
enable();
}
@@ -670,7 +670,6 @@
void
EditorEvent::editor_exit()
{
- std::cout << "Exit editor" << std::endl;
editor->save_tmp_level();
ScreenManager::instance ()->pop_screen ();
}
Index: editor_view.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/editor/editor_view.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- editor_view.cxx 16 Feb 2003 18:40:47 -0000 1.6
+++ editor_view.cxx 30 Mar 2003 13:12:35 -0000 1.7
@@ -32,8 +32,8 @@
{
center = Vector ((x2 - x1)/2.0f + x1,
(y2 - y1)/2.0f + y1);
- std::cout << "View: " << x1 << ", " << y1 << ", " << x2 << ", " << y2
- << std::endl;
+ //std::cout << "View: " << x1 << ", " << y1 << ", " << x2 << ", " << y2
+ //<< std::endl;
UNUSED_ARG(x_offset);
UNUSED_ARG(y_offset);
}
Index: object_selector.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/editor/object_selector.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- object_selector.cxx 21 Mar 2003 22:08:06 -0000 1.36
+++ object_selector.cxx 30 Mar 2003 13:12:35 -0000 1.37
@@ -659,7 +659,7 @@
if (keys.peek_key().state != CL_Key::NoKey)
{
key = keys.get_key();
- std::cout << "key: " << key.ascii << std::endl;
+ //std::cout << "key: " << key.ascii << std::endl;
return key.id;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.47,1.48 editor_event.cxx,1.54,1.55 editor_view.cxx,1.6,1.7 object_selector.cxx,1.36,1.37,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/contrib/clanlib README,NONE,1.1 clanlib_gui.diff,NONE,1.1 clanlib_x11_mousewheel.diff,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src button_panel.cxx,1.23,1.24 button_panel.hxx,1.16,1.17 pingus_main.cxx,1.56,1.57 result_screen.cxx,1.5,1.6 result_screen.hxx,1.2,1.3 start_screen.cxx,1.3,1.4 start_screen.hxx,1.1,1.2stat_manager.cxx,1.4,1.5
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/contrib/clanlib README,NONE,1.1 clanlib_gui.diff,NONE,1.1 clanlib_x11_mousewheel.diff,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src button_panel.cxx,1.23,1.24 button_panel.hxx,1.16,1.17 pingus_main.cxx,1.56,1.57 result_screen.cxx,1.5,1.6 result_screen.hxx,1.2,1.3 start_screen.cxx,1.3,1.4 start_screen.hxx,1.1,1.2stat_manager.cxx,1.4,1.5
- Index(es):