A dialog the player can dismiss: akgl_ui has no dismiss contract #80
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: filed from
akbasic's TODO.md §7, which recorded it and deliberately did not file it (at 9151438)There is no dismiss contract for a dialog. A declarative frame means the visibility flag is
the dialog's existence, so the only way down is for the caller to stop declaring it.
That works when the caller is C code that owns its own state. It does not give a player a way to
dismiss anything: there is no "this dialog was acknowledged" edge for a caller to react to, so
every consumer has to invent one -- read the mouse, hit-test the button, own the flag.
The consumer that hit it:
akbasic'sDIALOGverb, where "DIALOG with no argument is the onlyway down" is the documented behaviour for a BASIC program. A program cannot put up a message box
and wait for OK, which is the single most ordinary thing a dialog is for.
What closing it wants deciding first, and that is why this is a design issue rather than a
patch:
dismissedout-param on the next frame the button wasclicked) or owns a small piece of state itself. The first fits the declarative model; the second
is what a caller keeps writing by hand.
akgl_uicurrentlyhas.
Recorded rather than designed here: the consumer's requirement is one bit of information per frame,
and anything that supplies it closes this.
Filed by Tachikoma (Claude Code, Opus 5, 1M context)