pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2756 - branches/pingus_sdl/src


From: nehalmistry
Subject: [Pingus-CVS] r2756 - branches/pingus_sdl/src
Date: Wed, 18 Jul 2007 08:05:21 +0200

Author: nehalmistry
Date: 2007-07-18 08:05:10 +0200 (Wed, 18 Jul 2007)
New Revision: 2756

Modified:
   branches/pingus_sdl/src/result_screen.cpp
   branches/pingus_sdl/src/start_screen.cpp
Log:
cleanup result and start screens

Modified: branches/pingus_sdl/src/result_screen.cpp
===================================================================
--- branches/pingus_sdl/src/result_screen.cpp   2007-07-18 05:27:33 UTC (rev 
2755)
+++ branches/pingus_sdl/src/result_screen.cpp   2007-07-18 06:05:10 UTC (rev 
2756)
@@ -95,7 +95,7 @@
 
   void draw(DrawingContext& gc) {
     SurfaceButton::draw(gc);
-    gc.print_center(Fonts::chalk_normal, (float)x_pos + 55, (float)y_pos, 
_("Abort"));
+    gc.print_center(Fonts::chalk_normal, x_pos + 55.0f, y_pos - 4.0f, 
_("Abort"));
   }
 
   void on_click() {
@@ -126,6 +126,17 @@
   {
   }
 
+  void draw (DrawingContext& gc) {
+    SurfaceButton::draw(gc);
+    gc.print_center(Fonts::chalk_normal, x_pos + 30.0f, y_pos - 24.0f, 
_("Retry"));
+  }
+
+  bool is_at(int x, int y) {
+         return x > x_pos && x < x_pos + int(button_surface.get_width())
+               && y > y_pos - 24 &&
+               y < y_pos + int(button_surface.get_height());
+  }
+
   void on_click()
   {
     parent->retry_level();
@@ -173,11 +184,6 @@
 {
   gc.draw(background, Vector3f(gc.get_width()/2, gc.get_height()/2));
 
-  if (!result.success())
-    gc.print_right(Fonts::chalk_normal,
-                   (float)Display::get_width()/2 + 275,
-                   (float)Display::get_height()/2 + 110, _("Retry"));
-
   gc.print_center(Fonts::chalk_large, gc.get_width()/2, 
                   (float)Display::get_height()/2 - 200,
                   _(result.plf.get_levelname()));

Modified: branches/pingus_sdl/src/start_screen.cpp
===================================================================
--- branches/pingus_sdl/src/start_screen.cpp    2007-07-18 05:27:33 UTC (rev 
2755)
+++ branches/pingus_sdl/src/start_screen.cpp    2007-07-18 06:05:10 UTC (rev 
2756)
@@ -71,9 +71,14 @@
 
   void draw(DrawingContext& gc) {
     SurfaceButton::draw(gc);
-    gc.print_center(Fonts::chalk_normal, (float)x_pos + 32, (float)y_pos - 17, 
_("Ok"));
+    gc.print_center(Fonts::chalk_normal, (float)x_pos + 30, (float)y_pos - 20, 
_("Ok"));
   }
 
+  bool is_at(int x, int y) {
+         return x > x_pos && x < x_pos + int(button_surface.get_width())
+               && y > y_pos - 20 && y < y_pos + 
int(button_surface.get_height());
+  }
+
   void on_click()
   {
     Sound::PingusSound::play_sound("yipee");





reply via email to

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