# nodesnim/nodes/scene

Dark Mode

Search:
Group by:

The Scene uses in the `window.nim`. It contains other nodes. Only one scene can work at a time.

# Imports

node, ../thirdparty/opengl, ../core/enums, ../core/input

# Types

    SceneObj {...}{.final.} = object of NodeObj

    SceneRef = ref SceneObj

# Procs

    proc Scene(name: string = "Scene"): SceneRef {...}{.raises: [], tags: [].}

  Creates a new Scene.

  Arguments:

  - `name` is a scene name.

# Methods

    method drawScene(scene: SceneRef; w, h: GLfloat; paused: bool) {...}{.base,
        raises: [Exception], tags: [RootEffect].}

  Draws scene This used in the window.nim.

    method duplicate(self: SceneRef): SceneRef {...}{.base, raises: [], tags: [].}

  Duplicates Scene object and create a new Scene.

    method enter(scene: SceneRef) {...}{.base, raises: [Exception], tags: [RootEffect].}

  This called when scene was changed.

    method exit(scene: SceneRef) {...}{.base, raises: [Exception], tags: [RootEffect].}

  This called when scene was changed.

    method handleScene(scene: SceneRef; event: InputEvent; mouse_on: var NodeRef;
                      paused: bool) {...}{.base, raises: [Exception], tags: [RootEffect].}

  Handles user input. This called on any input.

    method reAnchorScene(scene: SceneRef; w, h: GLfloat; paused: bool) {...}{.base,
        raises: [Exception], tags: [RootEffect].}

  Recalculates node positions.