Noah Petherbridge
336a949ed0
* Adds global modal support in the pkg/modal/ package. It has easy Alert() and Confirm() methods to prompt the user before calling a callback function on affirmative response. * Modals have global app state: they're processed in the main loop in pkg/doodle.go similar to the global command shell. * When a modal is active, a semitransparent black frame covers the screen (gameplay loop paused, last game frame rendered below) and the modal window appears on top. * The developer console retains higher priority than the modal system and always renders on top. * Editor Mode: track when the level pixels have been modified, and confirm the user about unsaved changes when they attempt to close the level (New, Open, Close, etc.) * Global: the Escape key no longer immediately shuts down the game, but will confirm the user's intent via a modal. * File->Quit in the Editor Mode also invokes the confirm shutdown modal. |
||
---|---|---|
.. | ||
actor_animation.go | ||
actor_collision.go | ||
actor_events.go | ||
actor.go | ||
canvas_actors.go | ||
canvas_cursor.go | ||
canvas_editable.go | ||
canvas_link_tool.go | ||
canvas_present.go | ||
canvas_scrolling.go | ||
canvas_strokes.go | ||
canvas_wallpaper.go | ||
canvas.go |