[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.17,1.18 pingus_menu.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx,1.17,1.18 pingus_menu.cxx,1.18,1.19 |
Date: |
10 Apr 2003 16:01:04 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv27193
Modified Files:
exit_menu.cxx pingus_menu.cxx
Log Message:
fixed main menu for 640x480
Index: exit_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- exit_menu.cxx 9 Apr 2003 21:57:24 -0000 1.17
+++ exit_menu.cxx 10 Apr 2003 16:01:02 -0000 1.18
@@ -31,7 +31,8 @@
PingusMenuManager* manager;
public:
ExitMenuYesButton (PingusMenuManager* m)
- : GUI::SurfaceButton(230, 315,
+ : GUI::SurfaceButton(CL_Display::get_width()/2 - 170,
+ CL_Display::get_height()/2 + 15,
ResDescriptor("menu/exit_button_normal", "core"),
ResDescriptor("menu/exit_button_pressed", "core"),
ResDescriptor("menu/exit_button_hover", "core")),
@@ -41,7 +42,8 @@
void draw (GraphicContext& gc) {
SurfaceButton::draw(gc);
- gc.print_right(Fonts::chalk_large, 320, 325, _("Yes"));
+ gc.print_right(Fonts::chalk_large, CL_Display::get_width()/2 - 80,
+ CL_Display::get_height()/2 + 25, _("Yes"));
}
void on_click()
@@ -63,7 +65,7 @@
PingusMenuManager* manager;
public:
ExitMenuNoButton (PingusMenuManager* m)
- : GUI::SurfaceButton(400, 315,
+ : GUI::SurfaceButton(CL_Display::get_width()/2, CL_Display::get_height()/2
+ 15,
ResDescriptor("menu/exit_button_normal", "core"),
ResDescriptor("menu/exit_button_pressed", "core"),
ResDescriptor("menu/exit_button_hover", "core")),
@@ -73,7 +75,8 @@
void draw (GraphicContext& gc) {
SurfaceButton::draw(gc);
- gc.print_right(Fonts::chalk_large, 480, 325, _("No"));
+ gc.print_right(Fonts::chalk_large, CL_Display::get_width()/2 + 80,
+ CL_Display::get_height()/2 + 25, _("No"));
}
void on_click() {
Index: pingus_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_menu.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- pingus_menu.cxx 1 Apr 2003 18:24:25 -0000 1.18
+++ pingus_menu.cxx 10 Apr 2003 16:01:02 -0000 1.19
@@ -17,6 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#include <ClanLib/Display/Display/display.h>
#include <config.h>
#include "menu_button.hxx"
#include "pingus_resource.hxx"
@@ -72,15 +73,25 @@
void
PingusMenu::draw_foreground(GraphicContext& gc)
{
- gc.draw(background, (gc.get_width()/2) - (background.get_width()/2), 50);
+ if (gc.get_height() == 480)
+ {
+ gc.draw(background,
+ (gc.get_width()/2) - (background.get_width()/2),
+ 20);
+ }
+ else
+ {
+ gc.draw(background, (gc.get_width()/2) - (background.get_width()/2),
+ CL_Display::get_height()/10);
+ }
#ifdef OFFICIAL_PINGUS_BUILD
- gc.print_left(Fonts::pingus_small, 20, 500,
+ gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
"Pingus version "VERSION", Copyright (C) 2003 Ingo Ruhnke
<address@hidden>\n");
#else
- gc.print_left(Fonts::pingus_small, 20, 500,
+ gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
"Pingus version "VERSION" (unofficial build), Copyright (C)
2003 Ingo Ruhnke <address@hidden>\n");
#endif
- gc.print_left(Fonts::pingus_small, 20, 530,
+ gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-70,
"Pingus comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome\n"
"to redistribute it under certain conditions; see the file
COPYING for details.\n");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx,1.17,1.18 pingus_menu.cxx,1.18,1.19,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src story_screen.cxx,1.14,1.15
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.20,1.21 result_screen.cxx,1.13,1.14 start_screen.cxx,1.12,1.13
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src story_screen.cxx,1.14,1.15
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.20,1.21 result_screen.cxx,1.13,1.14 start_screen.cxx,1.12,1.13
- Index(es):