stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus/src/ui mainscr.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/ui mainscr.c
Date: Mon, 03 Nov 2003 13:22:57 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/11/03 13:22:57

Modified files:
        src/ui         : mainscr.c 

Log message:
        Fix for single selected button

Patches:
Index: stratagus/src/ui/mainscr.c
diff -u stratagus/src/ui/mainscr.c:1.138 stratagus/src/ui/mainscr.c:1.139
--- stratagus/src/ui/mainscr.c:1.138    Sun Nov  2 19:23:10 2003
+++ stratagus/src/ui/mainscr.c  Mon Nov  3 13:22:56 2003
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: mainscr.c,v 1.138 2003/11/03 00:23:10 jsalmon3 Exp $
+//     $Id: mainscr.c,v 1.139 2003/11/03 18:22:56 jsalmon3 Exp $
 
 //@{
 
@@ -203,9 +203,7 @@
     }
 
     // FIXME: allow without button
-    //if (TheUI.SingleSelectedButton) {
-    DebugCheck(!TheUI.SingleSelectedButton);
-    if (1) {
+    if (TheUI.SingleSelectedButton) {
        x = TheUI.SingleSelectedButton->X;
        y = TheUI.SingleSelectedButton->Y;
        DrawUnitIcon(unit->Player, type->Icon.Icon,
@@ -213,13 +211,13 @@
                (IconActive | (MouseButtons & LeftButton)) : 0,
            x, y);
        UiDrawLifeBar(unit, x, y);
-    }
 
-    if (unit->Player == ThisPlayer) {  // Only for own units.
-       if (unit->HP && unit->HP < 10000) {
-           sprintf(buf, "%d/%d", unit->HP, stats->HitPoints);
-           VideoDrawTextCentered(x + (type->Icon.Icon->Width + 7) / 2,
-               y + type->Icon.Icon->Height + 7 + 7 + 3, SmallFont, buf);
+       if (unit->Player == ThisPlayer) {       // Only for own units.
+           if (unit->HP && unit->HP < 10000) {
+               sprintf(buf, "%d/%d", unit->HP, stats->HitPoints);
+               VideoDrawTextCentered(x + (type->Icon.Icon->Width + 7) / 2,
+                   y + type->Icon.Icon->Height + 7 + 7 + 3, SmallFont, buf);
+           }
        }
     }
 




reply via email to

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