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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user