pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3178 - in trunk/pingus: . src/editor


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3178 - in trunk/pingus: . src/editor
Date: Tue, 18 Sep 2007 18:03:52 +0200

Author: grumbel
Date: 2007-09-18 18:03:52 +0200 (Tue, 18 Sep 2007)
New Revision: 3178

Modified:
   trunk/pingus/TODO
   trunk/pingus/src/editor/editor_level.cpp
   trunk/pingus/src/editor/editor_level.hpp
   trunk/pingus/src/editor/editor_screen.cpp
Log:
- hocked up level_new button

Modified: trunk/pingus/TODO
===================================================================
--- trunk/pingus/TODO   2007-09-18 15:55:01 UTC (rev 3177)
+++ trunk/pingus/TODO   2007-09-18 16:03:52 UTC (rev 3178)
@@ -204,11 +204,11 @@
 - implement proper tmpfile Support (save tmp levels to ~/.pingus/tmp/
   for backup purpose in case of editor crash or so)
 
-- add new level dialog
-
 Less Important:
 ===============
 
+- add yes/no question when creating a new level
+
 - add type conversion (important to convert groundpieces in hotspots and visa 
verse)
 
 - add options to show/hide hidden files and filter stuff

Modified: trunk/pingus/src/editor/editor_level.cpp
===================================================================
--- trunk/pingus/src/editor/editor_level.cpp    2007-09-18 15:55:01 UTC (rev 
3177)
+++ trunk/pingus/src/editor/editor_level.cpp    2007-09-18 16:03:52 UTC (rev 
3178)
@@ -41,6 +41,12 @@
   : editor(editor_),
     impl(new LevelImpl())
 {
+  clear();
+}
+
+void
+EditorLevel::clear()
+{
   impl->levelname   = "none";
   impl->description = "none";
   impl->author = "none";
@@ -53,6 +59,7 @@
   impl->number_of_pingus = 50;
   impl->number_to_save   = 20;
   
+  impl->actions.clear();
   impl->actions["basher"]  = 20;
   impl->actions["blocker"] = 20;
   impl->actions["boarder"] = 20;

Modified: trunk/pingus/src/editor/editor_level.hpp
===================================================================
--- trunk/pingus/src/editor/editor_level.hpp    2007-09-18 15:55:01 UTC (rev 
3177)
+++ trunk/pingus/src/editor/editor_level.hpp    2007-09-18 16:03:52 UTC (rev 
3178)
@@ -43,6 +43,9 @@
   /** Destructor */
   ~EditorLevel();
 
+  /** Sets default values */
+  void clear();
+
   /** Verify that level is valid */
   bool is_valid();
 

Modified: trunk/pingus/src/editor/editor_screen.cpp
===================================================================
--- trunk/pingus/src/editor/editor_screen.cpp   2007-09-18 15:55:01 UTC (rev 
3177)
+++ trunk/pingus/src/editor/editor_screen.cpp   2007-09-18 16:03:52 UTC (rev 
3178)
@@ -231,7 +231,12 @@
 void 
 EditorScreen::level_new()
 {
-  std::cout << "Function at '" << __FILE__ << ":" << __LINE__ << "' is 
unimplemented" << std::endl; 
+  // FIXME: dialogs don't update
+  level_pathname = Pathname();
+  viewport->clear();
+  plf->clear();
+  level_properties->set_level(plf);
+  action_properties->set_level(plf);
 }
 
 void 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]