diff options
| author | Xander Swan <no email> | 2025-12-17 18:38:21 -0500 |
|---|---|---|
| committer | Xander Swan <no email> | 2025-12-17 18:38:21 -0500 |
| commit | ce4d64bd41937d7dff18ca607122188dc338d696 (patch) | |
| tree | ad5f7cbdffcc1478883cbca0ea7b8365b2108d0a /editor | |
| parent | 87a7a010ecbe2cb99fedf44d0cac31e2efae86d5 (diff) | |
switch to raylib, update some structure
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/editor.odin | 32 | ||||
| -rwxr-xr-x | editor/run.sh | 3 |
2 files changed, 35 insertions, 0 deletions
diff --git a/editor/editor.odin b/editor/editor.odin new file mode 100644 index 0000000..f508514 --- /dev/null +++ b/editor/editor.odin @@ -0,0 +1,32 @@ +package editor + +import rl "vendor:raylib" +import mu "vendor:microui" + +state := struct{ + muctx: mu.Context +} + +main :: proc() { + rl.InitWindow(800, 400, "Editor") + defer rl.CloseWindow() + + ctx := &state.muctx + mu.init(ctx) + + ctx.text_width = mu.default_atlas_text_width + ctx.text_height = mu.default_atlas_text_height + + atlas_texture = rl.LoadRenderTexture(int(mu.DEFAULT_ATLAS_WIDTH), int(mu.DEFAULT_ATLAS_HEIGHT)) + defer rl.UnloadRenderTexture(state.atlas_texture) + + for rl.WindowShouldClose() { + mu.begin(ctx) + mu.label(ctx, "Test") + mu.end(ctx) + + rl.BeginDrawing() + + rl.EndDrawing() + } +} diff --git a/editor/run.sh b/editor/run.sh new file mode 100755 index 0000000..5c479e9 --- /dev/null +++ b/editor/run.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +odin run editor -vet -disallow-do -o:speed |
