Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,24 @@
|
||||
module main
|
||||
|
||||
import gg
|
||||
import sokol.sapp
|
||||
|
||||
fn main() {
|
||||
mut ctx := gg.new_context(
|
||||
bg_color: gg.white
|
||||
window_title: 'Cursor'
|
||||
frame_fn: frame
|
||||
init_fn: init
|
||||
)
|
||||
ctx.run()
|
||||
}
|
||||
|
||||
fn init(mut _ctx gg.Context) {
|
||||
sapp.set_mouse_cursor(.ibeam)
|
||||
}
|
||||
|
||||
fn frame(mut ctx gg.Context) {
|
||||
ctx.begin()
|
||||
ctx.draw_text_def(10, 25, 'Your cursor should be an I shaped beam.')
|
||||
ctx.end()
|
||||
}
|
||||
Reference in new issue
Block a user