stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus/src include/ui.h ui/mouse.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src include/ui.h ui/mouse.c
Date: 17 Jan 2004 00:03:37 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/17 00:03:37

Modified files:
        src/include    : ui.h 
        src/ui         : mouse.c 

Log message:
        Allow Clicking On Map under unused buttons

Patches:
Index: stratagus/src/include/ui.h
diff -u stratagus/src/include/ui.h:1.86 stratagus/src/include/ui.h:1.87
--- stratagus/src/include/ui.h:1.86     Thu Jan 15 13:05:38 2004
+++ stratagus/src/include/ui.h  Sat Jan 17 00:03:36 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ui.h,v 1.86 2004/01/15 02:05:38 jsalmon3 Exp $
+//     $Id: ui.h,v 1.87 2004/01/16 13:03:36 wizzard Exp $
 
 #ifndef __UI_H__
 #define __UI_H__
@@ -337,6 +337,7 @@
 extern UI** UI_Table;                                          /// All 
available user interfaces
 
 extern char RightButtonAttacks;                                /// right 
button 0 move, 1 attack.
+extern ButtonAction* CurrentButtons;  /// Current Selected Buttons
 extern char FancyBuildings;                            /// Mirror buildings 1 
yes, 0 now.
 
 extern int SpeedKeyScroll;                             /// Keyboard Scrolling 
Speed, in Frames
Index: stratagus/src/ui/mouse.c
diff -u stratagus/src/ui/mouse.c:1.168 stratagus/src/ui/mouse.c:1.169
--- stratagus/src/ui/mouse.c:1.168      Thu Jan 15 09:31:09 2004
+++ stratagus/src/ui/mouse.c    Sat Jan 17 00:03:36 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: mouse.c,v 1.168 2004/01/14 22:31:09 nobody_ Exp $
+//     $Id: mouse.c,v 1.169 2004/01/16 13:03:36 wizzard Exp $
 
 //@{
 
@@ -423,10 +423,12 @@
                                y >= TheUI.ButtonButtons[i].Y &&
                                y < TheUI.ButtonButtons[i].Y + 
TheUI.ButtonButtons[i].Height + 7) {
                        ButtonAreaUnderCursor = ButtonAreaButton;
-                       ButtonUnderCursor = i;
-                       CursorOn = CursorOnButton;
-                       MustRedraw |= RedrawButtonPanel;
-                       return;
+                       if (CurrentButtons[i].Pos != -1) {
+                               ButtonUnderCursor = i;
+                               CursorOn = CursorOnButton;
+                               MustRedraw |= RedrawButtonPanel;
+                               return;
+                       }
                }
        }
        if (NumSelected == 1 && Selected[0]->Type->Transporter && 
Selected[0]->InsideCount) {




reply via email to

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