benknoble / frosthaven-manager

GUI Frosthaven Scenario Manager
https://benknoble.github.io/frosthaven-manager
Other
6 stars 2 forks source link

Back/undo buttons #23

Closed benknoble closed 10 months ago

benknoble commented 2 years ago

In some situations, it is possible to return to the previous view without "undoing" any computations. Those are probably easy to implement.

But I would estimate most of the time "going back" really means "undo," and that requires storing state changes in a history to be able to rewind them. This could be a pretty invasive code change, and definitely needs some thought about design.

benknoble commented 1 year ago

I've implemented undo (code push soon ref'ing this issue).

I don't have Back buttons for the progressive states, but those are still fairly easy and low priority.

benknoble commented 10 months ago

With extraction of manager/transition.rkt in fcc9a41, this can be done in 2 steps:

  1. Make all transition functions idempotent (except for the change to mode).
  2. Add "Back" buttons to the various screens that call the backwards transition function.

I don't think I'll make it possible to go back from the main screen, though. Not sure what use that would have.