blob: f5085148ad7bb54a853b1224e7496f0aced1ef0a (
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
|
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()
}
}
|