mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: add option to decorate window
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user