diff options
author | Indrajith K L | 2021-08-02 17:10:03 +0530 |
---|---|---|
committer | Indrajith K L | 2021-08-02 17:10:03 +0530 |
commit | f2e4f563661e5203f0531e37110d060b20b2f04c (patch) | |
tree | 5d393d164896b9272dbfd85ec9cbbf24ef9c9769 /config.wren | |
parent | 7d988900e2f73992fea504419d61d4cdf759fedf (diff) | |
download | rebirth-wren-f2e4f563661e5203f0531e37110d060b20b2f04c.tar.gz rebirth-wren-f2e4f563661e5203f0531e37110d060b20b2f04c.tar.bz2 rebirth-wren-f2e4f563661e5203f0531e37110d060b20b2f04c.zip |
* Adds Music Management
* Code Refactoring
* Adds Fonts
Diffstat (limited to 'config.wren')
-rw-r--r-- | config.wren | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/config.wren b/config.wren index a1b8cec..eb085c1 100644 --- a/config.wren +++ b/config.wren @@ -1,10 +1,17 @@ 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", @@ -14,26 +21,24 @@ class Config { "PICK" : "c", "SELECT": "z", "ATTACK": "x", - "QUIT": "escape" + "QUIT": "escape", + "FULLSCREEN": "f" } } - static setup() { - Window.resize(800, 600) - Canvas.resize(800, 600) - Window.title = "REBIRTH" + setup() { + setupWindow() + setupFonts() } - // static KeyboardConstants() { - // return { - // "UP": "up", - // "DOWN": "down", - // "LEFT": "left", - // "RIGHT": "right", - // "PICK" : "c", - // "SELECT": "z", - // "ATTACK": "x", - // "QUIT": "esc" - // } - // } + setupWindow() { + Window.resize(__width*2, __height*2) + Canvas.resize(__width, __height) + Window.title = "REBIRTH" + } + + setupFonts() { + Font.load("font_medium", "assets/fonts/lunchds.ttf", 20) + Font.load("font_small", "assets/fonts/lunchds.ttf", 16) + } }
\ No newline at end of file |