Skip to content

Commit

Permalink
Use sensible UI defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasvl committed May 31, 2020
1 parent 9989676 commit 7ae769a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion conf.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function love.conf(t)
-- Debug mode
t.console = true
t.console = false

t.identity = "DRÖM"
t.window.title = "DRÖM 6800"
Expand Down
20 changes: 13 additions & 7 deletions ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function ui:init(CPU, keypad)
self.showDisplayWindow = true
self.showKeypadWindow = true
self.showCPUWindow = true
self.showCHIPOSWindow = true
self.showPIAWindow = true
self.showCHIPOSWindow = false
self.showPIAWindow = false
self.showInstructionsWindow = true
self.showMemoryWindow = true
self.showSpeakerWindow = true
Expand Down Expand Up @@ -165,6 +165,7 @@ function ui:draw()

if not self.fullscreenDisplay then
imgui.SetNextWindowPos(0, 20, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowSize(556, 320, "ImGuiCond_FirstUseEver")
self.showDisplayWindow = imgui.Begin("Display", nil, { "NoCollapse", (not self.fullscreenDisplay) and "MenuBar" })--, { "ImGuiWindowFlags_AlwaysAutoResize" })
win_x, win_y = imgui.GetWindowSize()
win_x = win_x - 16
Expand Down Expand Up @@ -213,7 +214,8 @@ function ui:draw()

if not self.fullscreenDisplay then
if self.showSpeakerWindow then
imgui.SetNextWindowPos(0, 20, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowPos(573, 53, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowSize(84, 101, "ImGuiCond_FirstUseEver")
self.showSpeakerWindow = imgui.Begin("Speaker", true, { })--, { "ImGuiWindowFlags_AlwaysAutoResize" })

local toggle = false
Expand All @@ -236,7 +238,8 @@ function ui:draw()
end

if self.showCPUWindow then
imgui.SetNextWindowSize(200, 200, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowSize(113, 222, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowPos(681, 21, "ImGuiCond_FirstUseEver")
self.showCPUWindow = imgui.Begin("CPU", true)
imgui.Text(string.format("Cycles: %d", cycles))
for _, reg in ipairs({"a", "b"}) do
Expand Down Expand Up @@ -318,7 +321,8 @@ function ui:draw()
end

if self.showInstructionsWindow then
imgui.SetNextWindowSize(200, 200, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowSize(206, 250, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowPos(352, 343, "ImGuiCond_FirstUseEver")
self.showInstructionsWindow = imgui.Begin("Instructions", true, "MenuBar")
if imgui.BeginMenuBar() then
if imgui.BeginMenu("Settings") then
Expand Down Expand Up @@ -384,7 +388,8 @@ function ui:draw()
end

if self.showMemoryWindow then
imgui.SetNextWindowSize(200, 200, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowSize(241, 355, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowPos(556, 244, "ImGuiCond_FirstUseEver")
self.showMemoryWindow = imgui.Begin("Memory", true, "MenuBar")
if imgui.BeginMenuBar() then
if imgui.BeginMenu("Settings") then
Expand Down Expand Up @@ -485,7 +490,8 @@ function ui:draw()
end

if self.showKeypadWindow then
imgui.SetNextWindowPos(540, 300, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowPos(4, 341, "ImGuiCond_FirstUseEver")
imgui.SetNextWindowSize(228, 250, "ImGuiCond_FirstUseEver")
self.showKeypadWindow = imgui.Begin("Keypad", true, { "NoScrollbar", "MenuBar" })
if imgui.BeginMenuBar() then
if imgui.BeginMenu("Layout") then
Expand Down

0 comments on commit 7ae769a

Please sign in to comment.