From 7a75e068e79ac033245802574d414f45f1b5b567 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Mon, 27 Feb 2012 05:46:02 +0000 Subject: [PATCH] Swaps the game's double- and triple-click selections, by popular demand (double-click now selects similar units, triple-click selects exact matches by rank) This was SVN commit r11178. --- .../data/mods/public/gui/session/input.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/binaries/data/mods/public/gui/session/input.js b/binaries/data/mods/public/gui/session/input.js index 0cffe3e741..612861dd0b 100644 --- a/binaries/data/mods/public/gui/session/input.js +++ b/binaries/data/mods/public/gui/session/input.js @@ -852,15 +852,6 @@ function handleInputAfterGui(ev) if (!doubleClicked) { // If double click hasn't already occurred, this is a double click. - // Select units matching exact template name (same rank) - templateToMatch = Engine.GuiInterfaceCall("GetEntityState", selectedEntity).template; - doubleClicked = true; - // Reset the timer so the user has an extra period 'doubleClickTimer' to do a triple-click - doubleClickTimer = now.getTime(); - } - else - { - // Double click has already occurred, so this is a triple click. // Select similar units regardless of rank templateToMatch = Engine.GuiInterfaceCall("GetEntityState", selectedEntity).identity.selectionGroupName; if (templateToMatch) @@ -871,6 +862,16 @@ function handleInputAfterGui(ev) { // No selection group name defined, so fall back to exact match templateToMatch = Engine.GuiInterfaceCall("GetEntityState", selectedEntity).template; } + + doubleClicked = true; + // Reset the timer so the user has an extra period 'doubleClickTimer' to do a triple-click + doubleClickTimer = now.getTime(); + } + else + { + // Double click has already occurred, so this is a triple click. + // Select units matching exact template name (same rank) + templateToMatch = Engine.GuiInterfaceCall("GetEntityState", selectedEntity).template; } // TODO: Should we handle "control all units" here as well?