Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul Tk UI and add history viewer #819

Open
Debilski opened this issue Aug 13, 2024 · 1 comment
Open

Overhaul Tk UI and add history viewer #819

Debilski opened this issue Aug 13, 2024 · 1 comment

Comments

@Debilski
Copy link
Member

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.

@Debilski
Copy link
Member Author

Debilski commented Oct 1, 2024

If we do that, we should probably also decouple font size and canvas size (#820) – or couple it stronger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant