gui: Implement slot selection
Context
This MR adds a form of slot selection to the grid:
- The current box is highlighted and follows focus.
- The current slot is highlighted with a slightly different colour and follows the current box.
- The orientation of the slot can be changed by pressing enter or double-clicking on the current box.
- The current slot content is internally exposed so that it can be consumed later to display the suggested words (see #69 (closed))
Here is a demo:
Implements #67 (closed).
What has changed?
Main Changes
gui
- Added
currentSlotPositions
,currentBoxPosition
andisCurrentSlotVertical
properties toCrosswordGridViewModel
- Bound these properties to
CrosswordGridPane
- Added
currentSlotPattern
property
Side Effects
gui
- Extracted stuff from
CrosswordGridPane
toCrosswordGridViewModel
.
Edited by Antoine Belvire