gg: add option to decorate window
parent
44e8770b73
commit
6079025985
|
@ -44,6 +44,7 @@ pub:
|
||||||
use_ortho bool
|
use_ortho bool
|
||||||
retina bool
|
retina bool
|
||||||
resizable bool
|
resizable bool
|
||||||
|
decorated bool = true
|
||||||
|
|
||||||
font_size int
|
font_size int
|
||||||
font_path string
|
font_path string
|
||||||
|
@ -82,6 +83,11 @@ pub fn new_context(cfg Cfg) &GG {
|
||||||
} else {
|
} else {
|
||||||
glfw.window_hint(C.GLFW_RESIZABLE, 0)
|
glfw.window_hint(C.GLFW_RESIZABLE, 0)
|
||||||
}
|
}
|
||||||
|
if cfg.decorated {
|
||||||
|
glfw.window_hint(C.GLFW_DECORATED, 1)
|
||||||
|
} else {
|
||||||
|
glfw.window_hint(C.GLFW_DECORATED, 0)
|
||||||
|
}
|
||||||
window = glfw.create_window(glfw.WinCfg{
|
window = glfw.create_window(glfw.WinCfg{
|
||||||
title: cfg.window_title
|
title: cfg.window_title
|
||||||
width: cfg.width
|
width: cfg.width
|
||||||
|
|
Loading…
Reference in New Issue