1
0
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:
Daniel Däschle 2020-02-17 20:29:09 +01:00 committed by GitHub
parent 44e8770b73
commit 6079025985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,7 @@ pub:
use_ortho bool
retina bool
resizable bool
decorated bool = true
font_size int
font_path string
@ -82,6 +83,11 @@ pub fn new_context(cfg Cfg) &GG {
} else {
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{
title: cfg.window_title
width: cfg.width