Vars
env: EnvironmentRef = newEnvironment(nil, 1.0'f32, nil)
main_scene: SceneRef = nil
current_scene: SceneRef = nil
scenes: seq[SceneRef] = @[]
paused: bool = false
running: bool = true
Procs
proc addScene(scene: SceneRef) {...}{.raises: [], tags: [].}
-
Adds a new scenes in app.
Arguments:
- scene - pointer to the Scene object.
proc addMainScene(scene: SceneRef) {...}{.raises: [], tags: [].}
-
Adds a new scene in the app and set it mark it as main scene.
Arguents:
- scene - pointer to the Scene object.
proc centeredWindow() {...}{.raises: [], tags: [].}
- Moves window to the display center.
proc changeScene(name: string; extra: seq[tuple[k: string, v: string]] = @[]): bool {...}{. discardable, raises: [Exception], tags: [RootEffect].}
-
Changes current scene.
Arguments:
- name - name of the added scene.
proc getSceneByName(name: string): SceneRef {...}{.raises: [], tags: [].}
proc getWindowSize(): Vector2Obj {...}{.raises: [], tags: [].}
proc resizeWindow(x, y: cint) {...}{.raises: [], tags: [].}
- Resizes window.
proc setMainScene(name: string) {...}{.raises: [], tags: [].}
-
Set up main scene.
Arguments:
- name - name of the added scene.
proc setTitle(title: cstring) {...}{.raises: [WindowError], tags: [].}
- Changes window title.
proc setIcon(icon_path: cstring) {...}{.raises: [WindowError], 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: [SceneError, Exception, GLerror], tags: [RootEffect, TimeEffect].}