aboutsummaryrefslogtreecommitdiff
path: root/config.wren
blob: 64278c77f9deb4b90c4666959a4161a27fe4c864 (plain)
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
import "graphics" for Canvas
import "dome" for Window
import "font" for Font

class Config {
    construct new() {
        __width = 320
        __height = 240
        setup()
    }

    static W {__width}
    static H {__height}

    static KeyboardConstants {
        return {
            "UP": "up",
            "DOWN": "down",
            "LEFT": "left",
            "RIGHT": "right",
            "PICK" : "c",
            "SELECT": "z",
            "ATTACK": "x",
            "QUIT": "escape",
            "FULLSCREEN": "f"
        }
    }

    setup() {
        setupWindow()
        setupFonts()
    }

    setupWindow() {
        Window.resize(__width*2, __height*2)
        Canvas.resize(__width, __height)
        Window.title = "REBIRTH"
    }
    
    setupFonts() {
        Font.load("font_title", "assets/fonts/lunchds.ttf", 20)
    }
}