-
Notifications
You must be signed in to change notification settings - Fork 493
Description
I thought the first two categories had straightforward solutions that weren't too bad, so I put them together in a PR: DFHack/scripts#1383
EditField internal restructuring casualty
- scripts/internal/gm-unit/editor_civilization.lua CivBox
gui/gm-unit, Civilization editor,l(select from list)/is the only special hotkey; it uses a label, but it is not clickable as a workaround!- it could easily be made clickable, but many other bits of gm-unit are also not clickable
- regression: / hotkey
- 50.15-r2 opens race selection (will be used to filter civ list)
- 51.03-r1 enters / in search field
- this is fallout from internal restructuring of EditField; CivBox re-sets its EditField's
ignore_keys, but since the new EditField is a wrapper that only reads itsignore_keysat init-time, the changed value is not used- if we ignore encapsulation, we can get the desired effect by reaching more deeply into the EditField:
- re-setting
self.subviews.list.edit.text_area.text_area.ignore_keysworks
- re-setting
- if we ignore encapsulation, we can get the desired effect by reaching more deeply into the EditField:
UIs with an occasionally focused EditField
These have player-accessible workarounds (unfocus the EditField). The PR just tries to make it a bit more obvious that certain keys are unavailable while the TextField is focused (add disabled fields that track the EditField's focus state).
-
scripts/gui/autochop.lua Autochop
gui/autochoplog target field (Ctrl+n: Target number of logs)- change Ctrl-u hotkey while log target field is focused
- 50.15-r2 undesignates all trees
- 51.03-r1 clears the contents of the log target field
- probably okay to keep the new behavior since the Ctrl-u hotkey still works when the log target field is not focused
-
scripts/gui/quantum.lua Quantum
gui/quantumname field (Ctrl+n: Name)- change Ctrl-z hotkey while name field is focused
- 50.15-r2 toggles "create pile"
- 51.03-r1 does undo in name field
- probably okay to keep the new behavior since the Ctrl-z hotkey still works when the name field is not focused
-
scripts/gui/quickfort.lua Quickfort
gui/quickfort- select a blueprint,
- use
m: Makerlabel to open marker options, - use
r: Repeatlabel to enable an up or down repeat, - use
R: xlabel to focus repeat count field
- change Ctrl-w hotkey while repeat field is focused
- 50.15-r2 toggles warm dig marker option
- 51.03-r1 deletes the word (or word part) before the cursor in focused EditField
EditField-centric UIs
These seem to need a bit of design consideration. I didn't see a quick fix that would allow the key to be (conditionally) used by both the EditField and the rest of the UI.
The UIs could probably use ignore_keys to "retain" the hotkey, but that would introduce non-uniformities in the support of the new text editing features.
Or if UI churn is okay, the UIs could switch to new hotkeys (or rearrange things so the EditField is not always focused, though this would be awkward for some of them, especially just to let one hotkey become active).
-
plugins/lua/zone.lua AssignAnimal
- show_pasture_pond_screen PasturePondOverlay (
zone.pasturepond)Ctrl+t: DFHack assignpen/pasture or pit/pond DF zone window
- show_cage_chain_screen CageChainOverlay (
zone.cagechain)Ctrl+t: DFHack assignfrom cage or chain DF building window
- most hotkeys are uppercase letters and are excluded from the search EditField with
:on_chars - clicking on the
Ctrl+a: Assign all/nonelabel works, but the corresponding keypress is consumed by the EditField:- regression: Ctrl-a hotkey
- 50.15-r2 assigns all/none
- 51.03-r1 selects all text in search EditField
- regression: Ctrl-a hotkey
- show_pasture_pond_screen PasturePondOverlay (
-
scripts/gui/civ-alert.lua Civalert
gui/civ-alertor click on the configure/gear icon in the civ alert overlay window (gui/civ-alert.big_red_button)- clicking on the
Ctrl+w: Sound alarm! …label works, but the corresponding keypress is consumed by the burrow filter EditField - regression: Ctrl-w hotkey
- 50.15-r2 enables civ-alert
- 51.03-r1 deletes the word (or word part) before the cursor in focused (burrow filter) EditField
-
scripts/gui/launcher.lua EditPanel
gui/launcher- two EditFields: command line, and history search
- these EditFields can lose focus, but only by giving it to the other EditField? (so, one of them is always focused)
- clicking on the
Ctrl+w: Tags: …label works, but the corresponding keypress is consumed by the focused EditField:- regression: Ctrl-w hotkey while either EditField is focused
- 50.15-r2 opens tag list
- 51.03-r1 deletes the word (or word part) before the cursor in focused EditField
- regression: Ctrl-w hotkey while either EditField is focused
-
scripts/gui/launcher.lua TagFilterPanel
gui/launcher, open the tags panel by clicking on theCtrl+w: Tags: …label- clicking on the
Ctrl+a: Cycle alllabel works, but the corresponding keypress is consumed by the EditField- regression: Ctrl-a hotkey
- 50.15-r2 cycles all tags
- 51.03-r1 selects all text in search EditField
- regression: Ctrl-a hotkey
-
scripts/internal/caravan/movegoods.lua MoveGoods
- MoveGoodsOverlay (
caravan.movegoods)Ctrl+t: DFHack move trade goodsfrom DF trade depot window
- AssignTradeOverlay (
caravan.assigntrade)Ctrl+t: DFHack move trade goodsfrom DF trading interface
- most hotkeys are uppercase letters and are excluded from the search EditField with
:on_chars - clicking on the
Ctrl+a: Select all/nonelabel works, but the corresponding keypress is consumed by the EditField- regression: Ctrl-a hotkey
- 50.15-r2 selects all trade goods
- 51.03-r1 selects all text in search EditField
- regression: Ctrl-a hotkey
- MoveGoodsOverlay (
-
scripts/internal/caravan/pedestal.lua AssignItems
- PedestalOverlay (
caravan.displayitemselector)Ctrl+t: DFHack assignfrom DF display furniture info window
- most hotkeys are uppercase letters and are excluded from the search EditField with
:on_chars - clicking on the
Ctrl+a: Select all/nonelabel works, but the corresponding keypress is consumed by the EditField- regression: Ctrl-a hotkey
- 50.15-r2 selects all the (filtered) items
- 51.03-r1 selects all text in search EditField
- regression: Ctrl-a hotkey
- PedestalOverlay (
-
scripts/internal/caravan/trade.lua Trade
- TradeBannerOverlay (
caravan.tradebanner)Ctrl+t: DFHack trade UIfrom DF trade screen
- most hotkeys are uppercase letters and are excluded from the search EditField with
:on_chars - clicking on the
Ctrl+a: Select all/nonelabel works, but the corresponding keypress is consumed by the EditField- regression: Ctrl-a hotkey
- 50.15-r2 selects all (filtered) trade goods
- 51.03-r1 selects all text in search EditField
- regression: Ctrl-a hotkey
- TradeBannerOverlay (
I know manipulator isn't released yet, but I did notice it has a hotkey conflict (and a couple of instances of "Escape does not cancel like right-click").
- scripts/gui/manipulator.lua QuickMenu
gui/manipulator- Ctrl-g Jump to column label
- should support Esc to exit?
- U Unhide column label
- problem Ctrl-a (unhide all) is masked by FilteredList's EditField
- should support Esc to exit?
- Ctrl-g Jump to column label