Skip to content

Commit 7ae769a

Browse files
committed
Use sensible UI defaults
1 parent 9989676 commit 7ae769a

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

conf.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function love.conf(t)
22
-- Debug mode
3-
t.console = true
3+
t.console = false
44

55
t.identity = "DRÖM"
66
t.window.title = "DRÖM 6800"

ui.lua

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ function ui:init(CPU, keypad)
6868
self.showDisplayWindow = true
6969
self.showKeypadWindow = true
7070
self.showCPUWindow = true
71-
self.showCHIPOSWindow = true
72-
self.showPIAWindow = true
71+
self.showCHIPOSWindow = false
72+
self.showPIAWindow = false
7373
self.showInstructionsWindow = true
7474
self.showMemoryWindow = true
7575
self.showSpeakerWindow = true
@@ -165,6 +165,7 @@ function ui:draw()
165165

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

214215
if not self.fullscreenDisplay then
215216
if self.showSpeakerWindow then
216-
imgui.SetNextWindowPos(0, 20, "ImGuiCond_FirstUseEver")
217+
imgui.SetNextWindowPos(573, 53, "ImGuiCond_FirstUseEver")
218+
imgui.SetNextWindowSize(84, 101, "ImGuiCond_FirstUseEver")
217219
self.showSpeakerWindow = imgui.Begin("Speaker", true, { })--, { "ImGuiWindowFlags_AlwaysAutoResize" })
218220

219221
local toggle = false
@@ -236,7 +238,8 @@ function ui:draw()
236238
end
237239

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

320323
if self.showInstructionsWindow then
321-
imgui.SetNextWindowSize(200, 200, "ImGuiCond_FirstUseEver")
324+
imgui.SetNextWindowSize(206, 250, "ImGuiCond_FirstUseEver")
325+
imgui.SetNextWindowPos(352, 343, "ImGuiCond_FirstUseEver")
322326
self.showInstructionsWindow = imgui.Begin("Instructions", true, "MenuBar")
323327
if imgui.BeginMenuBar() then
324328
if imgui.BeginMenu("Settings") then
@@ -384,7 +388,8 @@ function ui:draw()
384388
end
385389

386390
if self.showMemoryWindow then
387-
imgui.SetNextWindowSize(200, 200, "ImGuiCond_FirstUseEver")
391+
imgui.SetNextWindowSize(241, 355, "ImGuiCond_FirstUseEver")
392+
imgui.SetNextWindowPos(556, 244, "ImGuiCond_FirstUseEver")
388393
self.showMemoryWindow = imgui.Begin("Memory", true, "MenuBar")
389394
if imgui.BeginMenuBar() then
390395
if imgui.BeginMenu("Settings") then
@@ -485,7 +490,8 @@ function ui:draw()
485490
end
486491

487492
if self.showKeypadWindow then
488-
imgui.SetNextWindowPos(540, 300, "ImGuiCond_FirstUseEver")
493+
imgui.SetNextWindowPos(4, 341, "ImGuiCond_FirstUseEver")
494+
imgui.SetNextWindowSize(228, 250, "ImGuiCond_FirstUseEver")
489495
self.showKeypadWindow = imgui.Begin("Keypad", true, { "NoScrollbar", "MenuBar" })
490496
if imgui.BeginMenuBar() then
491497
if imgui.BeginMenu("Layout") then

0 commit comments

Comments
 (0)