pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src pingus_menu.cxx,1.6,1.7 pingus_menu.h


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src pingus_menu.cxx,1.6,1.7 pingus_menu.hxx,1.4,1.5
Date: 17 Aug 2002 00:28:32 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv8585

Modified Files:
        pingus_menu.cxx pingus_menu.hxx 
Log Message:
made PingusSubMenu a GUIScreen, its no longer a GUIManager
- added more inputhandling to the GUIScreen

Index: pingus_menu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingus_menu.cxx     16 Aug 2002 17:15:31 -0000      1.6
+++ pingus_menu.cxx     17 Aug 2002 00:28:30 -0000      1.7
@@ -30,8 +30,8 @@
 #include "display.hxx"
 #include "sound.hxx"
 #include "debug.hxx"
+#include "pingus_menu_manager.hxx"
 #include "game_delta.hxx"
-#include "gui/root_gui_manager.hxx"
 
 PingusMenu::PingusMenu(PingusMenuManager* m)
   : PingusSubMenu (m)
@@ -52,13 +52,13 @@
       background = PingusResource::load_surface("misc/logo", "core");
 
       // FIXME: Lilla... memory leak
-      add(new OptionsButton (this));
-      add(new CreditButton (this));
-      add(new QuitButton (this));
-      add(new MultiplayerButton (this));
-      add(new ThemeButton (this));
-      add(new StoryButton (this));
-      add(editor_button);
+      gui_manager->add(new OptionsButton (this));
+      gui_manager->add(new CreditButton (this));
+      gui_manager->add(new QuitButton (this));
+      gui_manager->add(new MultiplayerButton (this));
+      gui_manager->add(new ThemeButton (this));
+      gui_manager->add(new StoryButton (this));
+      gui_manager->add(editor_button);
     }
 
   // FIXME: Preload is probally the wrong place for this, there should
@@ -68,13 +68,18 @@
 
 PingusMenu::~PingusMenu()
 {
-  delete gui_manager;
 }
 
 void
 PingusMenu::on_resize(int w, int h)
 {
   pout << "Width: " << w << " Height: " << h << std::endl;
+}
+
+void
+PingusMenu::on_escape_press ()
+{
+  get_manager ()->show_exit_menu ();
 }
 
 /* EOF */

Index: pingus_menu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pingus_menu.hxx     30 Jul 2002 14:57:25 -0000      1.4
+++ pingus_menu.hxx     17 Aug 2002 00:28:30 -0000      1.5
@@ -45,7 +45,6 @@
 public:
   bool is_init;
 private:
-  GUI::GUIManager* gui_manager;
   Input::Controller* controller;
 
   SurfaceButton * temp_button;
@@ -61,6 +60,8 @@
 
   /// Load all images and other stuff for the menu
   void preload ();
+
+  void on_escape_press ();
 };
 
 #endif





reply via email to

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