Skip to content

Commit 601e4b5

Browse files
Add umbox init template
Signed-off-by: Marek Maškarinec <[email protected]>
1 parent d07ca1c commit 601e4b5

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

etc/umbox_init/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# UmBox + Tophat
2+
3+
You have successfully initialized an UmBox box from the tophat template.
4+
For more information about tophat, visit [tophat2d.dev](https://tophat2d.dev).

etc/umbox_init/box.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "tophat_box",
3+
"author": "unknown",
4+
"version": "v0.1.0",
5+
"license": "BSD-3",
6+
"readme": "README.md",
7+
"include": [],
8+
"description": "My Tophat based box",
9+
"dependencies": [ "tophat" ],
10+
"run_posix": "./umbox/tophat/tophat",
11+
"run_windows": "./umbox/tophat/tophat.exe"
12+
}

etc/umbox_init/init.tar

10 KB
Binary file not shown.

etc/umbox_init/main.um

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
import (
3+
"canvas.um"
4+
"th.um"
5+
"window.um"
6+
)
7+
8+
fn init*() {
9+
window::setup("Hello Tophat!", 640, 480)
10+
11+
window::onFrame.register({
12+
canvas::drawText("Hello Tophat!", { 5, 5 }, th::black, 4)
13+
})
14+
}

0 commit comments

Comments
 (0)