UI fixes
This commit is contained in:
@@ -489,6 +489,8 @@ func main() {
|
||||
|
||||
// ImGui
|
||||
var (
|
||||
statsWindowWidth float32 = 460
|
||||
statsWindowHeight float32 = 510
|
||||
settingWindowWidth float32 = 700
|
||||
settingsWindowState bool = true
|
||||
)
|
||||
@@ -612,8 +614,8 @@ func main() {
|
||||
if r != nil {
|
||||
gui.BeginFrame(time.Since(lastFrame), int32(r.Extent().Width), int32(r.Extent().Height))
|
||||
if showStats {
|
||||
cimgui.SetNextWindowPos(cimgui.Vec2{X: 0, Y: 0})
|
||||
cimgui.SetNextWindowSize(cimgui.Vec2{X: 460, Y: 510})
|
||||
cimgui.SetNextWindowPos(cimgui.Vec2{X: float32(r.Extent().Width) - statsWindowWidth, Y: 0})
|
||||
cimgui.SetNextWindowSize(cimgui.Vec2{X: statsWindowWidth, Y: statsWindowHeight})
|
||||
cimgui.BeginV("Stats", &showStats, cimgui.WindowFlagsNoResize|cimgui.WindowFlagsNoScrollbar)
|
||||
mediaStats := player.MediaStats.Snapshot()
|
||||
cimgui.SeparatorText("Video")
|
||||
@@ -1075,7 +1077,7 @@ func main() {
|
||||
}
|
||||
|
||||
if settingsWindowState {
|
||||
cimgui.SetNextWindowPos(cimgui.Vec2{X: float32(r.Extent().Width) - settingWindowWidth, Y: 0})
|
||||
cimgui.SetNextWindowPos(cimgui.Vec2{X: 0, Y: 0})
|
||||
cimgui.SetNextWindowSize(cimgui.Vec2{X: settingWindowWidth, Y: float32(r.Extent().Height)})
|
||||
if cimgui.BeginV("Settings & Info", &settingsWindowState, cimgui.WindowFlagsNone) {
|
||||
drawSettingsContents()
|
||||
|
||||
Reference in New Issue
Block a user