[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2839 - branches/pingus_sdl/src
From: |
plouj at BerliOS |
Subject: |
[Pingus-CVS] r2839 - branches/pingus_sdl/src |
Date: |
Sun, 12 Aug 2007 00:15:49 +0200 |
Author: plouj
Date: 2007-08-12 00:15:49 +0200 (Sun, 12 Aug 2007)
New Revision: 2839
Modified:
branches/pingus_sdl/src/pingus_menu.cpp
branches/pingus_sdl/src/pingus_menu.hpp
Log:
add a main menu button to show credits
Modified: branches/pingus_sdl/src/pingus_menu.cpp
===================================================================
--- branches/pingus_sdl/src/pingus_menu.cpp 2007-08-11 22:00:13 UTC (rev
2838)
+++ branches/pingus_sdl/src/pingus_menu.cpp 2007-08-11 22:15:49 UTC (rev
2839)
@@ -36,6 +36,7 @@
#include "path_manager.hpp"
#include "file_dialog.hpp"
#include "editor/editor_screen.hpp"
+#include "credits.hpp"
PingusMenu::PingusMenu (PingusMenuManager* m)
@@ -56,6 +57,11 @@
_("Exit"),
_("..:: Bye, bye ::.."));
+ credits_button = new MenuButton(this, Vector2i(Display::get_width() * 150 /
800,
+ Display::get_height() * 450 / 600),
+
Resource::load_sprite("core/menu/credits_on"),
+ _("Credits"),
+ _("..:: See the credits ::.."));
#if 0
contrib_button = new MenuButton(this, Vector2i(Display::get_width() * 150 /
800,
Display::get_height() * 450 / 600),
@@ -95,6 +101,7 @@
gui_manager->add(quit_button, false);
gui_manager->add(start_button, false);
+ gui_manager->add(credits_button, false);
}
#if 0
@@ -114,6 +121,12 @@
#endif
void
+PingusMenu::show_credits()
+{
+ ScreenManager::instance()->push_screen(Credits::instance(), false);
+}
+
+void
PingusMenu::setup_contrib_menu()
{
if (filedialog)
@@ -149,6 +162,7 @@
{
delete start_button;
delete quit_button;
+ delete credits_button;
#if 0
delete contrib_button;
delete story_button;
@@ -267,6 +281,10 @@
{
do_quit();
}
+ else if (button == credits_button)
+ {
+ show_credits();
+ }
#if 0
else if (button == contrib_button)
{
Modified: branches/pingus_sdl/src/pingus_menu.hpp
===================================================================
--- branches/pingus_sdl/src/pingus_menu.hpp 2007-08-11 22:00:13 UTC (rev
2838)
+++ branches/pingus_sdl/src/pingus_menu.hpp 2007-08-11 22:15:49 UTC (rev
2839)
@@ -46,6 +46,7 @@
MenuButton* start_button;
MenuButton* quit_button;
+ MenuButton* credits_button;
#if 0
MenuButton* contrib_button;
@@ -62,6 +63,7 @@
#if 0
void setup_game_menu();
#endif
+ void show_credits();
/** Show the levels folder */
void setup_contrib_menu();
/** Show the worldmap folder */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2839 - branches/pingus_sdl/src,
plouj at BerliOS <=