Ticket #805 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] Support double-click on unit group buttons

Reported by: Philip Owned by:
Priority: Should Have Milestone: Alpha 6
Component: Core engine Keywords: simple, review
Cc:

Description

When you assign unit groups (with ctrl+1 etc) it shows a little numbered button at the side of the screen. Double-clicking the button should have the same effect as double-pressing the digit key (i.e. move the camera to the units).

This probably needs some changes to the GUI engine, particularly IGUIButtonBehavior::HandleMessage to detect double-clicks and send a different message type (GUIM_DOUBLE_PRESSED, script event doublepress or something, probably in addition to the standard press event (since some other buttons want to treat it like two separate presses)), then updateGroups in mods/public/gui/session/session.js should set button.ondoublepress appropriately.

Attachments

doublepress.patch (1.6 KB) - added by merolum 2 years ago.
doublepress_alt_modularity.patch (1.4 KB) - added by merolum 2 years ago.
alternative patch with more similarities to the original code

Change History

Changed 2 years ago by merolum

comment:1 Changed 2 years ago by merolum

  • Keywords review added

comment:2 Changed 2 years ago by merolum

  • Keywords simple, added; simple removed

Changed 2 years ago by merolum

alternative patch with more similarities to the original code

comment:3 Changed 2 years ago by feneur

  • Summary changed from Support double-click on unit group buttons to [PATCH] Support double-click on unit group buttons

comment:4 Changed 2 years ago by Badmadblacksad

  • Status changed from new to closed
  • Resolution set to fixed

(In [9592]) Support double-click on unit group buttons. patch by Merolum. fixes #805.

comment:5 Changed 2 years ago by k776

  • Milestone changed from Backlog to Alpha 6

comment:6 Changed 2 years ago by philip

(In [9604]) Fix #805 more so it doesn't ignore the second click on non-double-clickable buttons.

Note: See TracTickets for help on using tickets.