nodesnim/nodes/scene

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

Types

SceneObj {...}{.final.} = object of CanvasObj
  data*: seq[tuple[k: string, v: string]]
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, GLerror], 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.