Opened 14 months ago
Last modified 14 months ago
#6748 new defect
Unit hotkeys: UI and implementation errors
Reported by: | Alex Theodoulidis | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 27 |
Component: | UI & Simulation | Keywords: | Hotkeys |
Cc: | Alex Theodoulidis | Patch: |
Description
Civilization: Iberians, Unit: Kantabriako Zaldun (example)
After a unit is selected, moving the cursor on a command's icon shows a description of the command and the corresponding hotkey inside brackets.
Although the attack command (three blades icon) is given by pressing Ctrl, the brackets are empty. Instead, [Ctrl] is shown on the garrison command (door and arrow icon). This is a UI problem.
Regarding the implementation errors, one I have found is the following: if a unit has gathered the maximum amount of meat from a deer and we use the "Return to Work" command (Y), the unit will not return to the city center to deliver the meat, but hunt a new deer. When the deer is dead, it will then deliver the previous collected meat.
Not a serious issue nonetheless.
Attachments (3)
Change History (8)
comment:1 by , 14 months ago
Milestone: | → Backlog |
---|
by , 14 months ago
by , 14 months ago
follow-up: 5 comment:3 by , 14 months ago
I remember there being a placeholder for non-set hotkeys? (With the hotkey identifier.)
comment:4 by , 14 months ago
Patch: | Alpha 26 |
---|
comment:5 by , 14 months ago
Milestone: | Backlog → Alpha 27 |
---|---|
Priority: | Nice to Have → Must Have |
Replying to Freagarach:
I remember there being a placeholder for non-set hotkeys? (With the hotkey identifier.)
bisect
possible solution
- use
Array.prototype.{flat,flatMap}
(added with ECMA 2019, Spidermonkey 62)-
binaries/data/mods/public/gui/common/color.js
a b function colorizeHotkey(text, hotkey) 175 175 // TODO: Be more efficient in retrieving the mapping(s) for a specific hotkey 176 176 let key = Engine.GetHotkeyMap()[hotkey]; 177 177 178 if (!key )178 if (!key?.flat().length) 179 179 key = sprintf(translate("Unassigned hotkey: %(hotkeyName)s"), { 180 180 "hotkeyName": hotkey 181 181 });
-
Replying to Alex Theodoulidis:
The
attack-move
is set by default toctrl
.No hotkey is assigned to
calltoarms
by default, which is similar toattack-move
but not the same.The ticket is still valid, the user does not know the name of the hotkey (
calltoarms
) to change it, and the description suggests that it has something to do withattack-move
.Course of action could be to adjust the description by including the phrase
call to arms
, change the cursor to rather than and also give a default hotkey, e.g.Alt-a
.