hide other windows when not paused

This commit is contained in:
2022-02-26 13:55:07 +08:00
parent aa3ad851cf
commit a71acc22a0
3 changed files with 62 additions and 58 deletions

View File

@@ -335,11 +335,13 @@ func (g *Game) Render(win *glfw.Window) {
g.ResizeDisplay(io.DisplaySize)
}
imgui.SliderFloat3("Sun", &sun, -1, 1)
if g.paused {
imgui.SliderFloat3("Sun", &sun, -1, 1)
imgui.SliderFloat("Water Alpha", &alpha, 0, 1)
imgui.SliderFloat("Gamma", &gamma, 1.6, 2.8)
imgui.SliderFloat("Exposure", &exposure, 0, 2)
}
normalSun := itype.Vec3f(sun).Normalize()
imgui.SliderFloat("Water Alpha", &alpha, 0, 1)
imgui.SliderFloat("Gamma", &gamma, 1.6, 2.8)
imgui.SliderFloat("Exposure", &exposure, 0, 2)
gl.Enable(gl.CULL_FACE)
gl.Enable(gl.DEPTH_TEST)