Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4145 closed enhancement (fixed)

[PATCH] Display autocomplete tooltips

Reported by: elexis Owned by: elexis
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

All hotkeys should be displayed at some point.

The attached patch adds tooltips to textfields that use "tab" to autocomplete playernames. It also adds the delete and delete without confirmation hotkeys for the replay menu and the public/team chat hotkeys.

Notice that is hardcoded in CInput.cpp instead of being specified in default.cfg. This is because (1) hotkeys are generally disabled if a text field is focused, so that the user can type things without executing random actions (exception to the rule being #3676). (2) The autocomplete event should be sent only to text fields (3) The autocomplete event shouldn't collide with the status bar hotkey (also tab)

Some potential criticism of the patch:

  • People often don't notice tooltips. The text could be displayed permanently below the text fields. Does seem noisy though and is likely not needed as the lobby and replay menu textfield has to be clicked on to type text there. Thus the tooltip will likely show up anyway informing the user of that feature, which might be able to conclude that autocomplete also works in the session chat.
  • Yes that "Tab" is not translated, as are those other assigned keys

Attachments (2)

autocomplete_hotkey_tooltips_v1.patch (5.8 KB ) - added by elexis 8 years ago.
autocomplete_hotkey_tooltips_v2.patch (8.4 KB ) - added by elexis 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by elexis, 8 years ago

Keywords: review added; rfc removed

Autocomplete hotkey tooltips for the gamesetup-, session- and lobby chat and replay playerlist filter, Delete hotkey tooltips for replay menu and save and load dialogs, fixes #4145.

Changes to the last version:

  • Added delete tooltips to save and loading dialog, moved shared code to a helper function
  • Press %(hotkey)s to delete without confirmation -> Hold...
  • Added translate call for "Tab"
  • removed function with only one statement
  • Fixed a wrong " " in replay_menu.js
  • replay_menu.js: UpdateHotkeys -> initHotkeyTooltips, and call it only on init, since they can't change dynamically at the moment

comment:2 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18751:

Autocomplete hotkey tooltips for the gamesetup-, session- and lobby chat and replay playerlist filter.
Delete hotkey tooltips for replay menu and save and load dialogs.
Reviewed by bb, fixes #4145.

comment:3 by elexis, 8 years ago

Keywords: review removed

Thanks for the review and testing bb.

  • Changed one " " to "\n" in the savegame delete tooltip
  • Have moved the translateWithContext("chat input", "Type the message to send.") string from XML to JS, so it wouldn't become orphaned
Note: See TracTickets for help on using tickets.