Skip to content

gui: Implement slot selection

Antoine Belvire requested to merge feature/67_gui_slot_selection into master

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:

Demo slot selection

Implements #67 (closed).

What has changed?

Main Changes

gui

  • Added currentSlotPositions, currentBoxPosition and isCurrentSlotVertical properties to CrosswordGridViewModel
  • Bound these properties to CrosswordGridPane
  • Added currentSlotPattern property

Side Effects

gui

  • Extracted stuff from CrosswordGridPane to CrosswordGridViewModel.
Edited by Antoine Belvire

Merge request reports