rev: tukan tukan/liveui.sc -rw-r--r-- 1.2 KiB View raw Log this file
21c5e6d2f665 — Leonard Ritter * renamed project from Liminal to Tukan 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# under construction; not really working yet

#!/usr/bin/env scopes

import .liminal.glmain
import .liminal.screen
import .liminal.glsl
#import .liminal.imgui
import .liminal.dockgui

let glmain = liminal.glmain
let screen = liminal.screen
let dockgui = liminal.dockgui

using import .liminal.gl
using import .liminal.glm
using import .liminal.glsl
using import .liminal.imgui

glmain.init
    title = "Liminal"
    width = 960
    height = 540
    resizable = true

global test-window-visible = true
'append dockgui.on-define-windows
    fn ()
        #ShowTestWindow test-window-visible

'append dockgui.on-define-main-menu
    fn ()
        if (BeginMenu "File")
            if (MenuItem "Exit")
                exit 0
            EndMenu;

# declaring a quoted list and printing its elements
let example_list =
    quote
        print "hello world"
        exit 0

fn code-dock ()
    for x in example_list
        let T = ('typeof x)
        if (T == list)
            let head rest = (decons (x as list))

            Button
                head as Symbol as string

'append dockgui.on-define-dock
    fn ()
        if (BeginDock "test")
            code-dock;
            EndDock;

glmain.loop;

glmain.shutdown;

print "done."