mini_arcade_core.engine.scenes.scene_manager

Module providing runtime adapters for window and scene management.

Classes

SceneAdapter

Manages multiple scenes (not implemented).

Module Contents

class mini_arcade_core.engine.scenes.scene_manager.SceneAdapter(registry: mini_arcade_core.scenes.registry.SceneRegistry, game: mini_arcade_core.engine.game.Game)

Manages multiple scenes (not implemented).

property current_scene: mini_arcade_core.scenes.sim_scene.SimScene | None

Get the currently active scene.

Returns:

The active Scene instance, or None if no scene is active.

Return type:

SimScene | None

property visible_stack: List[mini_arcade_core.scenes.sim_scene.SimScene]

Return the list of scenes that should be drawn (base + overlays). We draw from the top-most non-overlay scene upward.

Returns:

List of visible Scene instances.

Return type:

List[SimScene]

property listed_scenes: List[mini_arcade_core.scenes.sim_scene.SimScene]

Return all scenes in the stack.

Returns:

List of all Scene instances in the stack.

Return type:

List[SimScene]

change(scene_id: str)

Change the current scene to the specified scene.

Parameters:

scene_id (str) – Identifier of the scene to switch to.

push(scene_id: str, *, as_overlay: bool = False, policy: mini_arcade_core.engine.scenes.models.ScenePolicy | None = None)

Push a new scene onto the scene stack.

Parameters:
  • scene_id (str) – Identifier of the scene to push.

  • as_overlay (bool) – Whether to push the scene as an overlay.

pop() mini_arcade_core.scenes.sim_scene.SimScene | None

Pop the current scene from the scene stack.

Returns:

The popped Scene instance, or None if the stack was empty.

Return type:

SimScene | None

clean()

Clean up all scenes from the scene stack.

quit()

Quit the game

visible_entries() list[mini_arcade_core.engine.scenes.models.SceneEntry]
Render from bottom->top unless an opaque entry exists; if so,

render only from that entry up.

Returns:

List of SceneEntry instances to render.

Return type:

list[SceneEntry]

update_entries() list[mini_arcade_core.engine.scenes.models.SceneEntry]

Tick/update scenes considering blocks_update. Typical: pause overlay blocks update below it.

Returns:

List of SceneEntry instances to update.

Return type:

list[SceneEntry]

input_entry() mini_arcade_core.engine.scenes.models.SceneEntry | None

Who gets input this frame. If top blocks_input, only it receives input. If not, top still gets input (v1 simple). Later you can allow fall-through.

Returns:

The SceneEntry that receives input, or None if no scenes are active.

Return type:

SceneEntry | None

has_scene(scene_id: str) bool

Check if a scene with the given ID exists in the stack.

Parameters:

scene_id (str) – Identifier of the scene to check.

Returns:

True if the scene exists in the stack, False otherwise.

Return type:

bool

remove_scene(scene_id: str)

Remove a scene with the given ID from the stack.

Parameters:

scene_id (str) – Identifier of the scene to remove.