ASPP / pelita

Actor-based Toolkit for Interactive Language Education in Python
https://github.com/ASPP/pelita_template
Other
62 stars 68 forks source link

Overhaul Tk UI and add history viewer #819

Open Debilski opened 1 month ago

Debilski commented 1 month ago

In a first step, the idea would be to make the Tk Canvas stateless, i.e. without any implicit, hidden state.

The Tk render function should take a big dict with all necessary attributes that are needed to describe a particular state and should then automatically redraw all elements from that dict that have changed (and keep elements that have not changed).

This is already almost what we are doing but things like the overlay arrows and pacman rotation are currently not properly encoded in the UI state. In addition, the checks that are applied for when to redraw items are not standardised.

In a second step, we could then store all UI state dicts for a game and have history.