1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: setup ctx.window.user_data and ctx.user_data on ctx.run(), instead of in gg.new_context, to allow for embedding gg.Context in ui (#17169)

This commit is contained in:
Tim Marston
2023-01-31 16:22:20 +00:00
committed by GitHub
parent a932a8b1ea
commit 26b9464f51
4 changed files with 38 additions and 32 deletions

View File

@ -5,12 +5,13 @@ import gx
import sokol.sapp
fn main() {
gg.new_context(
mut ctx := gg.new_context(
bg_color: gx.white
window_title: 'Cursor'
frame_fn: frame
init_fn: init
).run()
)
ctx.run()
}
fn init(mut ctx gg.Context) {