[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx,1.13,1.14 exit_menu.hxx
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx,1.13,1.14 exit_menu.hxx,1.9,1.10 pingus_main.cxx,1.62,1.63 |
Date: |
2 Apr 2003 10:35:00 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv26837/src
Modified Files:
exit_menu.cxx exit_menu.hxx pingus_main.cxx
Log Message:
- repainted exit menu
Index: exit_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- exit_menu.cxx 25 Mar 2003 00:37:44 -0000 1.13
+++ exit_menu.cxx 2 Apr 2003 10:34:58 -0000 1.14
@@ -17,55 +17,59 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include <iostream>
#include <ClanLib/Display/Display/display.h>
+#include "my_gettext.hxx"
#include "pingus_menu_manager.hxx"
#include "pingus_resource.hxx"
+#include "gui/surface_button.hxx"
#include "gui/gui_manager.hxx"
-class ExitMenuYesButton : public GUI::Component
+class ExitMenuYesButton : public GUI::SurfaceButton
{
private:
PingusMenuManager* manager;
public:
ExitMenuYesButton (PingusMenuManager* m)
- : manager (m)
+ : GUI::SurfaceButton(230, 315,
+ ResDescriptor("menu/exit_button_normal", "core"),
+ ResDescriptor("menu/exit_button_pressed", "core"),
+ ResDescriptor("menu/exit_button_hover", "core")),
+ manager (m)
{
}
- bool is_at (int x, int y)
- {
- return x > 270 && x < 390 && y > 300 && y < 380;
+ void draw (GraphicContext& gc) {
+ GUI::SurfaceButton::draw(gc);
+ gc.print_left(Fonts::chalk_large, 250, 325, _(" Yes"));
}
- void draw (GraphicContext& gc) { UNUSED_ARG(gc); }
-
- void on_primary_button_press (int, int)
+ void on_click()
{
manager->exit ();
}
};
-class ExitMenuNoButton : public GUI::Component
+class ExitMenuNoButton : public GUI::SurfaceButton
{
private:
PingusMenuManager* manager;
public:
ExitMenuNoButton (PingusMenuManager* m)
- : manager (m)
- {
- }
-
- bool is_at (int x, int y)
+ : GUI::SurfaceButton(420, 315,
+ ResDescriptor("menu/exit_button_normal", "core"),
+ ResDescriptor("menu/exit_button_pressed", "core"),
+ ResDescriptor("menu/exit_button_hover", "core")),
+ manager (m)
{
- return x > 430 && x < 540 && y > 300 && y < 380;
}
- void draw (GraphicContext& gc) { UNUSED_ARG(gc); }
+ void draw (GraphicContext& gc) {
+ GUI::SurfaceButton::draw(gc);
+ gc.print_left(Fonts::chalk_large, 460, 325, _("No"));
+ }
- void on_primary_button_press (int, int)
- {
- manager->pop_menu ();
+ void on_click() {
+ manager->pop_menu();
}
};
@@ -83,23 +87,19 @@
bool
ExitMenu::draw (GraphicContext& gc)
{
- CL_Display::fill_rect (0, 0, CL_Display::get_width (),
CL_Display::get_height (),
- 0, 0, 0, 0.5);
- sur.put_screen (CL_Display::get_width ()/2 - sur.get_width ()/2,
- CL_Display::get_height ()/2 - sur.get_height ()/2);
- UNUSED_ARG(gc);
+ //gc.draw_fillrect (0, 0, CL_Display::get_width (), CL_Display::get_height
(),
+ //0, 0, 0, 0.5);
+ gc.draw(sur, gc.get_width ()/2 - sur.get_width ()/2,
+ gc.get_height ()/2 - sur.get_height ()/2);
+ gc.print_center(Fonts::chalk_large, gc.get_width()/2, gc.get_height()/2 -
70, _("Exit Pingus?"));
+ PingusSubMenu::draw(gc);
return true;
}
void
-ExitMenu::update (float /*delta*/)
-{
-}
-
-void
ExitMenu::preload ()
{
- sur = PingusResource::load_surface ("misc/exitmenu", "core");
+ sur = PingusResource::load_surface ("menu/exit_menu", "core");
}
/* EOF */
Index: exit_menu.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- exit_menu.hxx 1 Oct 2002 21:48:32 -0000 1.9
+++ exit_menu.hxx 2 Apr 2003 10:34:58 -0000 1.10
@@ -35,7 +35,6 @@
~ExitMenu ();
bool draw (GraphicContext& gc);
- void update (float delta);
void preload ();
private:
Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- pingus_main.cxx 1 Apr 2003 15:13:33 -0000 1.62
+++ pingus_main.cxx 2 Apr 2003 10:34:58 -0000 1.63
@@ -701,6 +701,9 @@
std::cout << _("music support: disabled") << std::endl;
std::cout << _("resolution set to: ") << screen_width << "x" <<
screen_height << std::endl;
+ std::cout << _("fullcscreen: ")
+ << (fullscreen_enabled ? _(" enabled") : _("disabled"))
+ << std::endl;
std::cout << std::endl;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx,1.13,1.14 exit_menu.hxx,1.9,1.10 pingus_main.cxx,1.62,1.63,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/data/images/core/menu exit_button_hover.png,NONE,1.1 exit_button_normal.png,NONE,1.1 exit_button_pressed.png,NONE,1.1 exit_menu.png,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/data/images Makefile.am,1.45,1.46
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/data/images/core/menu exit_button_hover.png,NONE,1.1 exit_button_normal.png,NONE,1.1 exit_button_pressed.png,NONE,1.1 exit_menu.png,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/data/images Makefile.am,1.45,1.46
- Index(es):