Skip to content

Commit cbf4715

Browse files
committed
gg: ui mode fixes
1 parent 0e254e0 commit cbf4715

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vlib/gg/gg.v

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ mut:
107107
// (so that the user can store image ids, not entire Image objects)
108108
image_cache []Image
109109
needs_refresh bool = true
110-
ticks int
110+
ticks int // for ui mode only
111111
pub:
112112
native_rendering bool
113113
pub mut:
@@ -236,6 +236,9 @@ fn gg_event_fn(ce &C.sapp_event, user_data voidptr) {
236236
// e := unsafe { &sapp.Event(ce) }
237237
mut e := unsafe { &Event(ce) }
238238
mut g := unsafe { &Context(user_data) }
239+
if g.ui_mode {
240+
g.refresh_ui()
241+
}
239242
if e.typ == .mouse_down {
240243
bitplace := int(e.mouse_button)
241244
g.mbtn_mask |= byte(1 << bitplace)

0 commit comments

Comments
 (0)