Author Topic: Allow typing values in custom game menu  (Read 589 times)

ctz

  • Summoner
  • **
  • Posts: 46
  • aka cathaur, formerly lyra
    • View Profile
Allow typing values in custom game menu
« on: 21 December 2013, 04:45:23 »
In the custom game menu, if there are a lot of maps or tilesets installed, it can be difficult to select the desired one since the user has to do O(n) clicks if there are n items to choose from.  Changing the CPU multiplier also requires unnecessarily many clicks.

I suggest that if the user clicks in the gray area of a setting, it becomes editable (like the area for the name).  The user then is able to type anything into this area.  This would be easier to use than shift+letter+click, which can be hard to do even for an Emacs user (e.g. try shift+M+click), and doesn't work for map names starting with numbers.

If the user presses Enter, the setting is set to the appropriate value, if found; if an invalid value was entered, it reverts to what it was before.  The search should be case-insensitive and treat underscores and spaces equally.  If the user presses Escape, the field should be reverted to its previous value (i.e. no change).  Tab completion would also be useful.

Examples:
User enters "Conflict" in map area; map is then set to "Conflict".
Current faction is "Magic"; user enters "NotAFaction" in faction area; no such faction exists, so the faction is not changed (remains "Magic").
User enters "3.2" in CPU multiplier area; the CPU multiplier is set to 3.2.
User enters "0.4" in CPU multiplier area; the CPU multiplier is not set (it is out of range).
User enters "one king rules them all" for map; map is set to the file "one_king_rules_them_all.gbm".
User enters "One king Rules them All" for map; same result.
User enters "one_king_rules_them_all" for map; same result.
Current map is "Conflict"; user types "one king rules them all" in map area and presses escape; map remains "Conflict".

 

anything