pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.3,1.4 action_butt


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.3,1.4 action_button.hxx,1.3,1.4 button_panel.cxx,1.6,1.7 pingus_menu.cxx,1.3,1.4 pingus_menu.hxx,1.2,1.3 pingus_menu_manager.cxx,1.2,1.3 story.hxx,1.2,1.3 surface_button.cxx,1.2,1.3 surface_button.hxx,1.3,1.4
Date: 29 Jul 2002 22:17:56 -0000

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

Modified Files:
        action_button.cxx action_button.hxx button_panel.cxx 
        pingus_menu.cxx pingus_menu.hxx pingus_menu_manager.cxx 
        story.hxx surface_button.cxx surface_button.hxx 
Log Message:
turned menu buttons into gui

Index: action_button.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/action_button.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- action_button.cxx   28 Jun 2002 15:12:22 -0000      1.3
+++ action_button.cxx   29 Jul 2002 22:17:53 -0000      1.4
@@ -41,39 +41,6 @@
 {
 }
 
-EventButton::EventButton(int x, int y, std::string str) : Button(x, y) 
-{ 
-  surface = PingusResource::load_surface(str, "global");
-}
-
-EventButton::~EventButton() {}
-
-void
-EventButton::draw()
-{
-  if (mouse_over(CL_Vector() /* FIXME */))
-    {
-      CL_Display::fill_rect(x_pos, y_pos, 
-                           x_pos + surface.get_width(), y_pos + 
surface.get_height(),
-                           1.0, 1.0, 1.0, 1.0);
-    }
-  surface.put_screen(x_pos, y_pos);
-}
-
-bool
-EventButton::mouse_over(const CL_Vector& pos)
-{
-  if (pos.x > x_pos && pos.x < x_pos + int(surface.get_width())
-      && pos.y > y_pos && pos.y < y_pos + int(surface.get_height()))
-    {
-      return true;
-    }
-  else 
-    {
-      return false;
-    }
-}
-
 ActionButton::ActionButton() {}
 
 ActionButton::~ActionButton() {}
@@ -218,10 +185,10 @@
                     action_c);
 }
 
-ArmageddonButton::ArmageddonButton(int x, int y) : 
-        Button      (x, y),
-        background  (PingusResource::load_surface("buttons/hbuttonbgb", 
"core")),
-        backgroundhl(PingusResource::load_surface("buttons/hbuttonbg", "core"))
+ArmageddonButton::ArmageddonButton(int x, int y)
+  : x_pos (x), y_pos (y),
+    background  (PingusResource::load_surface("buttons/hbuttonbgb", "core")),
+    backgroundhl(PingusResource::load_surface("buttons/hbuttonbg", "core"))
 {
   pressed      = false;
   surface      = PingusResource::load_surface("buttons/armageddon_anim", 
"core");
@@ -247,10 +214,10 @@
 }
 
 bool
-ArmageddonButton::mouse_over(const CL_Vector& pos)
+ArmageddonButton::is_at(int x, int y)
 {
-  if (pos.x > x_pos && pos.x < x_pos + int(surface.get_width())
-      && pos.y > y_pos && pos.y < y_pos + int(surface.get_height()))
+  if (x > x_pos && x < x_pos + int(surface.get_width())
+      && y > y_pos && y < y_pos + int(surface.get_height()))
     {
       return true;
     } else  {

Index: action_button.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/action_button.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- action_button.hxx   28 Jun 2002 15:12:22 -0000      1.3
+++ action_button.hxx   29 Jul 2002 22:17:53 -0000      1.4
@@ -24,6 +24,7 @@
 #include <string>
 #include "anim_counter.hxx"
 #include "pingu_enums.hxx"
+#include "gui/component.hxx"
 
 using Pingus::Actions::ActionName;
 
@@ -33,54 +34,32 @@
 class CL_Vector;
 
 // ----------------- snip --------------------
-///
 class Button
 {
 protected:
-  ///
   int x_pos;
-  ///
   int y_pos;
-  ///
+
   CL_Surface surface;
-  ///
   bool pressed;
 public:
-  ///
   Button();
-  
   Button (int x, int y);
-  ///
   virtual ~Button();
 
-  ///
   virtual void   draw() = 0;
-  ///
   virtual bool   mouse_over(const CL_Vector& pos) = 0;
 };
 
 // ----------------- snip --------------------
 ///
-class EventButton : public Button
-{
-private: 
-public:
-  ///
-  EventButton(int x, int y, std::string);
-  ///
-  virtual ~EventButton();
-  
-  ///
-  void   draw();
-  ///
-  bool   mouse_over(const CL_Vector& pos);
-};
-
-// ----------------- snip --------------------
-///
-class ArmageddonButton : public Button
+class ArmageddonButton : public GUI::Component
 {
 private:
+  int x_pos;
+  int y_pos;
+  bool pressed;
+  CL_Surface surface;
   CL_Surface background;
   CL_Surface backgroundhl;
 
@@ -92,7 +71,7 @@
   virtual ~ArmageddonButton();
 
   void draw();
-  bool mouse_over(const CL_Vector& pos);
+  bool is_at(int x, int y);
 };
 
 // ----------------- snip --------------------
@@ -138,33 +117,23 @@
 class ActionButton : public Button
 {
 protected:
-  ///
   CL_Font*    font;
-  ///
   CL_Font*    font_h;
   // Added for printing action names next to the button.
   CL_Font*    font_b;
 
   ActionName name;
-  ///
   int available;
-  ///
   bool is_multi_direct;
 
-  ///
   ActionHolder* action_holder;
-  ///
   AnimCounter action_c;
 public:  
-  ///
   bool pressed;
 
-  ///
   ActionButton();
-  ///
   virtual ~ActionButton();
 
-  ///
   void init(int x, int y, ActionName name_, int owner_id);
 
   /// Draws the button and increase the animation counter.
@@ -179,10 +148,8 @@
   /// Returns true if the button is pressed.
   bool   is_pressed();
 
-  ///
   virtual bool   mouse_over(const CL_Vector& pos) = 0;
 
-  ///
   void set_action_holder(ActionHolder* h);
 };
 

Index: button_panel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/button_panel.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- button_panel.cxx    29 Jul 2002 11:57:38 -0000      1.6
+++ button_panel.cxx    29 Jul 2002 22:17:53 -0000      1.7
@@ -168,7 +168,7 @@
        pressed_button = button;
     }
   
-  if (armageddon->mouse_over(CL_Vector (x, y)))
+  if (armageddon->is_at(x, y))
     {
       last_press = CL_System::get_time();
       

Index: pingus_menu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingus_menu.cxx     21 Jun 2002 07:45:35 -0000      1.3
+++ pingus_menu.cxx     29 Jul 2002 22:17:53 -0000      1.4
@@ -20,6 +20,7 @@
 #include <ClanLib/Display/Input/input.h>
 #include <ClanLib/Display/Input/keyboard.h>
 #include <ClanLib/Display/Input/inputdevice.h>
+
 #include "globals.hxx"
 #include "alpha_button.hxx"
 #include "surface_button.hxx"
@@ -29,11 +30,16 @@
 #include "display.hxx"
 #include "sound.hxx"
 #include "debug.hxx"
+#include "gui/root_gui_manager.hxx"
 
 PingusMenu::PingusMenu(PingusMenuManager* m)
   : PingusSubMenu (m)
 {
   is_init = false;
+
+  // FIXME: Memory leak
+  controller = new Input::Controller ("../doc/mycontroller.xml");
+  gui_manager = new GUI::RootGUIManager (controller);
 }
 
 void
@@ -42,25 +48,26 @@
   if (!is_init)
     {
       pout << "PingusMenu::init ()" << std::endl;
-      event_enabled = true;
+      //event_enabled = true;
       is_init = true;
          SurfaceButton* editor_button = new EditorButton (this);
  
       if (start_editor)
-       {
-         
-         editor_button->on_click ();
+       {  
+         std::cout << "Editor starting is disabled" << std::endl;
+         //editor_button->on_click ();
        }
 
       background = PingusResource::load_surface("misc/logo", "core");
 
-      buttons.push_back(new OptionsButton (this));
-      buttons.push_back(new PlayButton (this));
-      buttons.push_back(new QuitButton (this));
-      buttons.push_back(new MultiplayerButton (this));
-      buttons.push_back(new ThemeButton (this));
-      buttons.push_back(new StoryButton (this));
-      buttons.push_back(editor_button);
+      // FIXME: Lilla... memory leak
+      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
@@ -70,92 +77,19 @@
 
 PingusMenu::~PingusMenu()
 {
-  for (std::list<SurfaceButton*>::iterator it = buttons.begin(); it != 
buttons.end(); ++it)
-  {
-    delete *it;
-  }
 }
 
 void
 PingusMenu::draw()
 {
-  for(std::list<SurfaceButton*>::iterator i = buttons.begin();
-      i != buttons.end(); ++i)
-    (*i)->draw();
-}
-
-void
-PingusMenu::on_mouse_move(CL_InputDevice *, int /*mouse_x*/, int /*mouse_y*/)
-{
-}
-
-void
-PingusMenu::on_button_press(CL_InputDevice *device, const CL_Key &key)
-{
-  if (!event_enabled) return;
-  pout << "Buttonpress: " << event_enabled << std::endl;
-
-  draw();
-  
-  if (device == CL_Input::keyboards[0])
-    {
-      switch(key.id)
-       {
-       case CL_KEY_C:
-         {
-           event_enabled = false;
-           Credits credits;
-           credits.display();
-           draw();
-           event_enabled = true;
-         }
-         break;
-       default:
-         pout << "PingusMenu: Unknown key pressed:" << key.ascii << std::endl;
-       }
-    }
+  gui_manager->draw ();
 }
 
 void
-PingusMenu::on_button_release(CL_InputDevice *device, const CL_Key &key)
+PingusMenu::update (float delta)
 {
-  if (!event_enabled) return;
-  pout << "Buttonrel: " << event_enabled << std::endl;
-  
-  draw();
-
-  if (device == CL_Input::keyboards[0])
-    {
-      switch (key.id)
-       {
-       case CL_KEY_L:
-         break;
-       case CL_KEY_F:
-         break;
-       default:
-         if (verbose) pout << "PingusMenu::Event: Unknown key pressed: " << 
key.id << std::endl;
-         break;
-       }
-    }
-  else if (device == CL_Input::pointers[0])
-    {
-      if (verbose) pout << "PingusMenu::Event: on_button_press" << std::endl;
-
-      for(std::list<SurfaceButton*>::iterator i = buttons.begin(); 
-         i != buttons.end(); 
-         i++)
-       {
-         // Mouse_over drawing is handled in surface_button.cxx
-         if ((*i)->mouse_over())
-           {
-             event_enabled = false;
-             Display::hide_cursor();
-             (*i)->on_click();
-             Display::show_cursor();
-             event_enabled = true;
-           }
-       }
-    }
+  controller->update (delta);
+  gui_manager->update (delta);
 }
 
 void

Index: pingus_menu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pingus_menu.hxx     24 Jun 2002 22:52:55 -0000      1.2
+++ pingus_menu.hxx     29 Jul 2002 22:17:53 -0000      1.3
@@ -28,24 +28,28 @@
 class CL_InputDevice;
 class SurfaceButton;
 
-///
+namespace GUI
+{
+  class GUIManager;
+}
+
+namespace Input
+{
+  class Controller;
+}
+
 class PingusMenu : public PingusSubMenu
 {
 public:
-  ///
   bool is_init;
 private:
-  ///
-  std::list<SurfaceButton*> buttons;
-  ///
+  GUI::GUIManager* gui_manager;
+  Input::Controller* controller;
+
   SurfaceButton * temp_button;
-  ///
   SurfaceButton * current_button;
-  ///
   CL_Surface background;
-  ///
   LayerManager layer_manager;
-  ///
   CL_Surface cursor_sur;
   
   void on_resize(int w, int h);
@@ -56,15 +60,8 @@
   /// Load all images and other stuff for the menu
   void preload ();
 
-  void update (float /*delta*/) {}
+  void update (float /*delta*/);
   void draw(void);
-
-  void select(void);
-  bool event_enabled;
-
-  void on_button_press(CL_InputDevice *device, const CL_Key &key);
-  void on_button_release(CL_InputDevice *device, const CL_Key &key);
-  void on_mouse_move(CL_InputDevice *,int mouse_x, int mouse_y);
 };
 
 #endif

Index: pingus_menu_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu_manager.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pingus_menu_manager.cxx     13 Jun 2002 14:25:12 -0000      1.2
+++ pingus_menu_manager.cxx     29 Jul 2002 22:17:53 -0000      1.3
@@ -53,13 +53,15 @@
   if (event_register_counter == 0)
     {
       ++event_register_counter;
-
+      
+      /*
       on_button_press_slot
        = CL_Input::sig_button_press ().connect (this, 
&PingusMenuManager::on_button_press);
       on_button_release_slot
        = CL_Input::sig_button_release ().connect (this, 
&PingusMenuManager::on_button_release);
       on_mouse_move_slot
        = CL_Input::sig_mouse_move ().connect (this, 
&PingusMenuManager::on_mouse_move);
+      */
     }
   else
     {
@@ -67,13 +69,14 @@
     }
 }
 
-/// Unregister all event-handling stuff
 void 
 PingusMenuManager::unregister_events ()
 {
+  /*
   CL_Input::sig_button_press ().disconnect (on_button_press_slot);
   CL_Input::sig_button_release ().disconnect (on_button_release_slot);
   CL_Input::sig_mouse_move ().disconnect (on_mouse_move_slot);
+  */
 }
 
 void 

Index: story.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/story.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- story.hxx   24 Jun 2002 22:52:57 -0000      1.2
+++ story.hxx   29 Jul 2002 22:17:53 -0000      1.3
@@ -30,20 +30,14 @@
 class Story : public PingusSubMenu
 {
 private:
-  ///
   bool   is_init;
-  ///
   CL_Surface background;
   CL_Surface story;
-  ///
   CL_Font*  large_font;
-  ///
   CL_Font*  small_font;
 
 public:
-  ///
   Story(PingusMenuManager* manager);
-  ///
   ~Story();
 
   /// Load all surfaces into memory.

Index: surface_button.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/surface_button.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- surface_button.cxx  13 Jun 2002 14:25:12 -0000      1.2
+++ surface_button.cxx  29 Jul 2002 22:17:53 -0000      1.3
@@ -38,7 +38,9 @@
   font = PingusResource::load_font("Fonts/pingus_small", "fonts");
   font_large = PingusResource::load_font("Fonts/pingus", "fonts");
 
-  is_mouse_over = false;
+  mouse_over = false;
+  pressed = false;
+
   //std::cout << "Generating font cache: " << std::flush;
   // We print all available letters, so that they are in the cache
   //font->print_left (0,0, "!\"#$%&'()*+,-./0123456789:;<=>address@hidden|}~");
@@ -53,21 +55,12 @@
 void 
 SurfaceButton::draw()
 {
-  if (mouse_over() && !CL_Mouse::left_pressed()) 
+  if (mouse_over && !pressed)
     {
-      if (!is_mouse_over) 
-       {
-         PingusSound::play_sound ("sounds/chain.wav", 0.1f);
-       }
-
-      is_mouse_over = true;
-      // font->print_center(CL_Display::get_width() / 2, 10, desc.c_str());
       font->print_center(CL_Display::get_width() / 2, 
                         CL_Display::get_height() - 20, 
                         desc.c_str());
 
-      //      surface->put_screen(x_pos - surface->get_width()/2,
-      //                         y_pos - surface->get_height()/2);
       surface_p.put_screen(x_pos - surface_p.get_width()/2,
                           y_pos - surface_p.get_height()/2);
 
@@ -85,18 +78,14 @@
                                   line2.c_str());
        }
     }
-  else if (mouse_over() && CL_Mouse::left_pressed()) 
+  else if (mouse_over && pressed)
     {
       float shrink = 0.9f;
       
-      // font->print_center(CL_Display::get_width() / 2, 10, desc.c_str());
       font->print_center(CL_Display::get_width() / 2, 
                         CL_Display::get_height() - 20, 
                         desc.c_str());
 
-      //      surface->put_screen(x_pos - surface->get_width()/2,
-      //                 y_pos - surface->get_height()/2);
-
       surface_p.put_screen(int(x_pos - surface_p.get_width()/2 * shrink),
                           int(y_pos - surface_p.get_height()/2 * shrink),
                           shrink, shrink);
@@ -116,36 +105,56 @@
     } 
   else 
     {
-      is_mouse_over = false;
       surface_p.put_screen(x_pos - surface_p.get_width()/2,
                           y_pos - surface_p.get_height()/2);
-
-      //      surface->put_screen(x_pos - surface->get_width()/2,
-      //                         y_pos - surface->get_height()/2);
     }
 }
 
+void
+SurfaceButton::update (float delta)
+{    
+}
+
+void
+SurfaceButton::on_pointer_enter ()
+{
+  mouse_over = true;
+  PingusSound::play_sound ("sounds/chain.wav", 0.1f);
+}
+
+void
+SurfaceButton::on_pointer_leave ()
+{
+  std::cout << "X: " << this << "leave" << std::endl;
+  mouse_over = false;
+}
+
+void
+SurfaceButton::on_pointer_press ()
+{
+  pressed = true;
+}
+ 
+void
+SurfaceButton::on_pointer_release ()
+{
+  pressed = false;
+}
+
 bool
-SurfaceButton::mouse_over()
+SurfaceButton::is_at(int x, int y)
 {
   assert (surface);
 
-  if (CL_Mouse::get_x() > x_pos - int(surface.get_width()) / 2
-      && CL_Mouse::get_x() < x_pos + int(surface.get_width()) / 2
-      && CL_Mouse::get_y() > y_pos - int(surface.get_height()) / 2
-      && CL_Mouse::get_y() < y_pos + int(surface.get_height()) / 2)
-    {
-      return true;
-    }
-  else
-    {
-      return false;
-    }
+  return (x > x_pos - int(surface.get_width()) / 2
+         && x < x_pos + int(surface.get_width()) / 2
+         && y > y_pos - int(surface.get_height()) / 2
+         && y < y_pos + int(surface.get_height()) / 2);
 }
 
 ///////////////////////////////////////////////
 
-PlayButton::PlayButton(PingusMenu* menu)
+CreditButton::CreditButton(PingusMenu* menu)
   : menu (menu)
 {
   // x_pos = CL_Display::get_width() * 500 / 640;
@@ -169,23 +178,15 @@
   //surface_p = PingusResource::load_surface("Buttons/play_p", "menu");
 }
 
-PlayButton::~PlayButton()
+CreditButton::~CreditButton()
 {
 }
 
 void 
-PlayButton::on_click()
+CreditButton::on_click()
 {
-  menu->get_manager ()->disable_events ();
   Credits credits;
   credits.display();
-  menu->get_manager ()->enable_events ();
-  
-  // FIXME: Hack, abusing the play button for the credits
-  //  loading_screen.draw();
-
-  /// PingusGame game;
-  // game.start_game();
 }
 
 ///////////////////////////////////////////////
@@ -361,7 +362,6 @@
   PingusSound::play_sound ("sounds/letsgo.wav");
   
   menu->get_manager ()->set_menu (&menu->get_manager ()->story);
-  //worldmap_manager.display();
 }
 
 ThemeButton::ThemeButton (PingusMenu* menu)

Index: surface_button.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/surface_button.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- surface_button.hxx  2 Jul 2002 15:46:58 -0000       1.3
+++ surface_button.hxx  29 Jul 2002 22:17:53 -0000      1.4
@@ -21,34 +21,23 @@
 #define HEADER_PINGUS_SURFACE_BUTTON_HXX
 
 #include <string>
+#include <ClanLib/Display/Display/surface.h>
+
 #include "worldmap/manager.hxx"
 #include "multiplayer_config.hxx"
-#include <ClanLib/Display/Display/surface.h>
+#include "gui/component.hxx"
 
 class CL_Font;
 class PingusMenu;
 
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-/* !FIXME! All this should be rewritten... */
-
-
-///
-class SurfaceButton
+/** Framework for menu buttons */
+class SurfaceButton : public GUI::Component
 {
 protected:
   CL_Surface surface;
   CL_Surface surface_p;
   CL_Font*    font;
   CL_Font*    font_large;
-  bool is_mouse_over;
   
   int x_pos;
   int y_pos;
@@ -56,27 +45,39 @@
   std::string desc;
   std::string line1;
   std::string line2;
+
+  bool mouse_over;
+  bool pressed;
+
 public:
   SurfaceButton();
   virtual ~SurfaceButton();
   
   void draw();
-  bool mouse_over();
-  virtual void on_click() = 0;
+  void update (float delta);
+
+  bool is_at (int x, int y);
+
+  void on_pointer_enter ();
+  void on_pointer_leave ();
+  void on_pointer_press ();
+  void on_pointer_release ();
+  
+  void on_button_click (int x, int y) { on_click (); }
+
+  virtual void on_click () =0;
 };
 
-///
-class PlayButton : public SurfaceButton
+class CreditButton : public SurfaceButton
 {
 private:
   PingusMenu* menu;
 public:
-  PlayButton(PingusMenu* menu);
-  virtual ~PlayButton();
+  CreditButton(PingusMenu* menu);
+  virtual ~CreditButton();
   void on_click();
 };
 
-///
 class OptionsButton : public SurfaceButton
 {
 private:
@@ -84,11 +85,9 @@
 public:
   OptionsButton(PingusMenu* menu);
   virtual ~OptionsButton();
-
   void on_click();
 };
 
-///
 class QuitButton : public SurfaceButton
 {
 private:
@@ -96,35 +95,26 @@
 public:
   QuitButton(PingusMenu*);
   virtual ~QuitButton();
-
   void on_click();
 };
 
-///
 class LoadButton : public SurfaceButton
 {
-private:
-  ///  FileSelector file;
 public:
   LoadButton();
-  ///
   virtual ~LoadButton();
-  ///
   void on_click();
 };
 
-///
 class EditorButton : public SurfaceButton
 {
 private:
   PingusMenu* menu;
 
 public:
-  ///
   EditorButton(  PingusMenu* menu);
-  ///
   virtual ~EditorButton();
-  ///
+
   void on_click();
   void load_level(const std::string& str);
 };
@@ -140,7 +130,6 @@
   void on_click();
 };
 
-///
 class ThemeButton : public SurfaceButton
 {
 private:
@@ -150,18 +139,14 @@
   void on_click();
 };
 
-///
 class MultiplayerButton : public SurfaceButton
 {
 private:
   MultiplayerConfig multiplayer_config;
   PingusMenu* menu;
 public:
-  ///
   MultiplayerButton(PingusMenu* menu);
-  ///
   virtual ~MultiplayerButton();
-  ///
   void on_click();
 };
 




reply via email to

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