The standard way to show an rpg.EventRunner's dialogue: a MessageBox on a WindowStack.
This is exactly what EventRunner used to do inside itself. Moving it here is what lets
mwg/rpg stay renderer-free while the common case stays a single argument - a game writes
present: messageBoxPresenter(this.windows) rather than the twelve lines of box
construction every game would otherwise copy.
It lives in two-d/ui rather than in rpg because it is the half that knows about widgets;
the type it satisfies comes back the other way as a type-only import, which erases at
runtime and so adds no dependency in either direction.
The standard way to show an
rpg.EventRunner's dialogue: aMessageBoxon aWindowStack.This is exactly what
EventRunnerused to do inside itself. Moving it here is what letsmwg/rpgstay renderer-free while the common case stays a single argument - a game writespresent: messageBoxPresenter(this.windows)rather than the twelve lines of box construction every game would otherwise copy.It lives in
two-d/uirather than inrpgbecause it is the half that knows about widgets; the type it satisfies comes back the other way as a type-only import, which erases at runtime and so adds no dependency in either direction.