gg: add quit fn (#10223)
parent
8828054e5b
commit
6cdc7646b8
|
@ -359,6 +359,11 @@ pub fn (gg &Context) run() {
|
|||
sapp.run(&gg.window)
|
||||
}
|
||||
|
||||
// quit closes the context window and exits the event loop for it
|
||||
pub fn (ctx &Context) quit() {
|
||||
sapp.request_quit() // does not require ctx right now, but sokol multi-window might in the future
|
||||
}
|
||||
|
||||
pub fn (mut ctx Context) set_bg_color(c gx.Color) {
|
||||
ctx.clear_pass = gfx.create_clear_pass(f32(c.r) / 255.0, f32(c.g) / 255.0, f32(c.b) / 255.0,
|
||||
f32(c.a) / 255.0)
|
||||
|
|
Loading…
Reference in New Issue