- Selecting a list item with the keyboard no longer automatically enters
edit mode; this makes keyboard navigation on the save list possible
because subsequent keys are no longer trapped by the text field.
- Clicking a selected item that's not in edit mode will now correctly
cause it to enter edit mode, instead of doing nothing.
- "Untitled saved game" edit mode initialization is no longer skipped
when entering edit mode by pressing the Enter key.
- Deleting an item now leaves the slot selected so that the selection
can be changed with the keyboard.
These commands allow greater control over editable ListWidgets, although
the save dialog's list is currently the only one.
kListItemSingleClickedCmd allows clients to respond to selection changes
based on the method used (mouse vs keyboard) and allows responding to
clicking on an already selected item. In the next commit, this will fix
multiple save issues.
kListItemEditModeStartedCmd allows clients to initialize edit mode
consistently. The save dialog has been doing custom initialization after
calling startEditMode, but this is incorrect because ListWidget calls
startEditMode in response to Enter, so the initialization is skipped.
Fixes the delete/backspace hotkey on the save list dialog; it was only
working on the load list even though they both have the same delete
functionality.
This is a check from 17 years ago that I believe was confused and had
no effect at the time. I believe the intent was to ignore these keys
while in edit mode, which makes sense, but instead this code ignored
these keys on all editable lists when *not* in edit mode. This wasn't
noticeable because there's only one editable ListWidget in ScummVM,
the save list, and it didn't listen for kListItemRemovalRequestCmd
until three years ago: aac1eb12bf
Fixes minor bug introduced in 829c600a02
In the saveload list dialog, selecting an empty slot before the last
save stopped coloring most of the row. Empty slots after the last save
continued to display correctly. Now both code blocks are consistent and
the selected row is always fully colored.