nodesnim/window

Vars

env: EnvironmentRef = newEnvironment()
main_scene: ScenePtr = nil
current_scene: ScenePtr = nil
scenes: seq[ScenePtr] = @[]
paused: bool = false

Procs

proc addScene(scene: ScenePtr) {...}{.raises: [], tags: [].}

Adds a new scenes in app.

Arguments:

  • scene - pointer to the Scene object.
proc changeScene(name: string): bool {...}{.discardable, raises: [Exception],
                                   tags: [RootEffect].}

Changes current scene.

Arguments:

  • name - name of the added scene.
proc setMainScene(name: string) {...}{.raises: [], tags: [].}

Set up main scene.

Arguments:

  • name - name of the added scene.
proc setTitle(title: cstring) {...}{.raises: [WindowNotCreatedError], tags: [].}
Changes window title.
proc Window(title: cstring; w: cint = 640; h: cint = 360) {...}{.cdecl,
    raises: [GLerror, Exception], tags: [RootEffect].}

Creates a new window pointer

Arguments:

  • title - window title.
proc windowLaunch() {...}{.raises: [GLerror, Exception, MainSceneNotLoadedError],
                    tags: [RootEffect, TimeEffect].}
Start main window loop.