pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2778 - branches/pingus_sdl/src/components


From: jsalmon3
Subject: [Pingus-CVS] r2778 - branches/pingus_sdl/src/components
Date: Fri, 3 Aug 2007 05:26:18 +0200

Author: jsalmon3
Date: 2007-08-03 05:26:15 +0200 (Fri, 03 Aug 2007)
New Revision: 2778

Modified:
   branches/pingus_sdl/src/components/action_button.cpp
Log:
Sprite animations in action buttons should always loop instead of stopping
Show the action name next to the button when the mouse is on it



Modified: branches/pingus_sdl/src/components/action_button.cpp
===================================================================
--- branches/pingus_sdl/src/components/action_button.cpp        2007-08-02 
06:03:18 UTC (rev 2777)
+++ branches/pingus_sdl/src/components/action_button.cpp        2007-08-03 
03:26:15 UTC (rev 2778)
@@ -49,6 +49,7 @@
   font_b = Fonts::pingus_large;
 
   sprite = Resource::load_sprite("pingus/player0/" + action_to_string(name) + 
"/right");
+  sprite.set_play_loop(true);
 }
 
 bool
@@ -129,15 +130,15 @@
 
   // print the action name next to the button, when mouse pointer is on
   // the button.
-  // FIXME: this should use the GUI events, not CL_Mouse
-#if 0
+  // FIXME: this should use the GUI events, not SDL_GetMouseState
+  int x, y;
+  SDL_GetMouseState(&x, &y);
   if (action_help
-      && CL_Mouse::get_x() > x_pos      && CL_Mouse::get_x() < x_pos + 60
-      && CL_Mouse::get_y() < y_pos + 35 && CL_Mouse::get_y() > y_pos)
+      && x > x_pos      && x < x_pos + 60
+      && y < y_pos + 35 && y > y_pos)
     {
       gc.print_left(myfontb, (float)x_pos + 65, (float)y_pos, 
action_to_screenname(name));
     }
-#endif
 
   if (Cheat::unlimited_actions)
     {





reply via email to

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