gg: add option to decorate window

pull/3761/head
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
1 changed files with 6 additions and 0 deletions

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