This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 9592 for ps


Ignore:
Timestamp:
06/06/11 21:31:34 (14 years ago)
Author:
Badmadblacksad
Message:

Support double-click on unit group buttons. patch by Merolum. fixes #805.

Location:
ps/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/gui/session/session.js

    r9554 r9592  
    246246            button.hidden = false;
    247247        button.onpress = (function(i) { return function() { performGroup("select", i); } })(i);
     248        button.ondoublepress = (function(i) { return function() { performGroup("snap", i); } })(i);
    248249    }
    249250    var numButtons = i;
  • ps/trunk/source/gui/IGUIButtonBehavior.cpp

    r9340 r9592  
    6464            m_Pressed = false;
    6565            // BUTTON WAS CLICKED
    66             SendEvent(GUIM_PRESSED, "press");
     66            if (Message.type == GUIM_MOUSE_RELEASE_LEFT)
     67            {
     68                SendEvent(GUIM_PRESSED, "press");
     69            }
     70            // BUTTON WAS DOUBLE CLICKED
     71            else
     72            {
     73                if (SendEvent(GUIM_MOUSE_DBLCLICK_LEFT, "doublepress") == IN_PASS)
     74                    SendEvent(GUIM_PRESSED, "press");
     75            }
    6776        }
    6877    }   break;
Note: See TracChangeset for help on using the changeset viewer.