1 | module main |
2 | |
3 | import gg |
4 | import gx |
5 | import sokol.sapp |
6 | |
7 | fn main() { |
8 | mut ctx := gg.new_context( |
9 | bg_color: gx.white |
10 | window_title: 'Cursor' |
11 | frame_fn: frame |
12 | init_fn: init |
13 | ) |
14 | ctx.run() |
15 | } |
16 | |
17 | fn init(mut ctx gg.Context) { |
18 | sapp.set_mouse_cursor(.ibeam) |
19 | } |
20 | |
21 | fn frame(mut ctx gg.Context) { |
22 | ctx.begin() |
23 | ctx.draw_text_def(10, 25, 'Your cursor should be an I shaped beam.') |
24 | ctx.end() |
25 | } |