Skip to content

Commit aad874b

Browse files
committed
Fix debug windows sizes and positions
1 parent 69f2564 commit aad874b

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

platforms/shared/desktop/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void config_read(void)
106106
config_debug.debug = read_bool("Debug", "Debug", false);
107107
config_debug.show_disassembler = read_bool("Debug", "Disassembler", true);
108108
config_debug.show_screen = read_bool("Debug", "Screen", true);
109-
config_debug.show_memory = read_bool("Debug", "Memory", true);
109+
config_debug.show_memory = read_bool("Debug", "Memory", false);
110110
config_debug.show_processor = read_bool("Debug", "Processor", true);
111111
config_debug.show_huc6260_info = read_bool("Debug", "HuC6260Info", false);
112112
config_debug.show_huc6260_palettes = read_bool("Debug", "HuC6260Palettes", false);

platforms/shared/desktop/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct config_Debug
107107
bool show_screen = true;
108108
bool show_disassembler = true;
109109
bool show_processor = true;
110-
bool show_memory = true;
110+
bool show_memory = false;
111111
bool show_huc6260_info = false;
112112
bool show_huc6260_palettes = false;
113113
bool show_huc6270_registers = false;

platforms/shared/desktop/gui.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void main_window(void);
4949
static void push_recent_rom(std::string path);
5050
static void show_status_message(void);
5151
static void set_style(void);
52-
static ImVec4 Lerp(const ImVec4& a, const ImVec4& b, float t);
52+
static ImVec4 lerp(const ImVec4& a, const ImVec4& b, float t);
5353

5454
void gui_init(void)
5555
{
@@ -357,7 +357,7 @@ static void main_window(void)
357357
{
358358
flags |= ImGuiWindowFlags_AlwaysAutoResize;
359359

360-
ImGui::SetNextWindowPos(ImVec2(625, 31), ImGuiCond_FirstUseEver);
360+
ImGui::SetNextWindowPos(ImVec2(616, 26), ImGuiCond_FirstUseEver);
361361

362362
ImGui::Begin("Output###debug_output", &config_debug.show_screen, flags);
363363
gui_main_window_hovered = ImGui::IsWindowHovered();
@@ -542,15 +542,15 @@ static void set_style(void)
542542
style.Colors[ImGuiCol_DockingPreview] = style.Colors[ImGuiCol_HeaderActive] * ImVec4(1.0f, 1.0f, 1.0f, 0.7f);
543543
style.Colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
544544
style.Colors[ImGuiCol_TabHovered] = style.Colors[ImGuiCol_HeaderHovered];
545-
//style.Colors[ImGuiCol_Tab] = Lerp(style.Colors[ImGuiCol_Header], style.Colors[ImGuiCol_TitleBgActive], 0.80f);
546-
style.Colors[ImGuiCol_TabSelected] = Lerp(style.Colors[ImGuiCol_HeaderActive], style.Colors[ImGuiCol_TitleBgActive], 0.60f);
545+
//style.Colors[ImGuiCol_Tab] = lerp(style.Colors[ImGuiCol_Header], style.Colors[ImGuiCol_TitleBgActive], 0.80f);
546+
style.Colors[ImGuiCol_TabSelected] = lerp(style.Colors[ImGuiCol_HeaderActive], style.Colors[ImGuiCol_TitleBgActive], 0.60f);
547547
style.Colors[ImGuiCol_TabSelectedOverline] = style.Colors[ImGuiCol_HeaderActive];
548-
style.Colors[ImGuiCol_TabDimmed] = Lerp(style.Colors[ImGuiCol_Tab], style.Colors[ImGuiCol_TitleBg], 0.80f);
549-
style.Colors[ImGuiCol_TabDimmedSelected] = Lerp(style.Colors[ImGuiCol_TabSelected], style.Colors[ImGuiCol_TitleBg], 0.40f);
548+
style.Colors[ImGuiCol_TabDimmed] = lerp(style.Colors[ImGuiCol_Tab], style.Colors[ImGuiCol_TitleBg], 0.80f);
549+
style.Colors[ImGuiCol_TabDimmedSelected] = lerp(style.Colors[ImGuiCol_TabSelected], style.Colors[ImGuiCol_TitleBg], 0.40f);
550550
style.Colors[ImGuiCol_TabDimmedSelectedOverline] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
551551
}
552552

553-
static ImVec4 Lerp(const ImVec4& a, const ImVec4& b, float t)
553+
static ImVec4 lerp(const ImVec4& a, const ImVec4& b, float t)
554554
{
555555
return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t);
556556
}

platforms/shared/desktop/gui_debug_disassembler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ void gui_debug_go_back(void)
232232
void gui_debug_window_disassembler(void)
233233
{
234234
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f);
235-
ImGui::SetNextWindowPos(ImVec2(159, 31), ImGuiCond_FirstUseEver);
236-
ImGui::SetNextWindowSize(ImVec2(463, 553), ImGuiCond_FirstUseEver);
235+
ImGui::SetNextWindowPos(ImVec2(155, 26), ImGuiCond_FirstUseEver);
236+
ImGui::SetNextWindowSize(ImVec2(458, 553), ImGuiCond_FirstUseEver);
237237

238238
ImGui::Begin("Disassembler", &config_debug.show_disassembler, ImGuiWindowFlags_MenuBar);
239239

@@ -545,7 +545,7 @@ static void draw_disassembly(void)
545545
ImGui::PushFont(gui_default_font);
546546
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, mid_gray);
547547

548-
bool window_visible = ImGui::BeginChild("##dis", ImVec2(ImGui::GetContentRegionAvail().x, 0), true, 0);
548+
bool window_visible = ImGui::BeginChild("##dis", ImVec2(ImGui::GetContentRegionAvail().x, 0), true, ImGuiWindowFlags_HorizontalScrollbar);
549549

550550
if (window_visible)
551551
{

platforms/shared/desktop/gui_debug_huc6260.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void gui_debug_window_huc6260_info(void)
3434
{
3535
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f);
3636
ImGui::SetNextWindowPos(ImVec2(75, 228), ImGuiCond_FirstUseEver);
37-
ImGui::SetNextWindowSize(ImVec2(280, 170), ImGuiCond_FirstUseEver);
37+
ImGui::SetNextWindowSize(ImVec2(280, 174), ImGuiCond_FirstUseEver);
3838
ImGui::Begin("HuC6260 Info", &config_debug.show_huc6260_info);
3939

4040
ImGui::PushFont(gui_default_font);
@@ -94,7 +94,7 @@ void gui_debug_window_huc6260_palettes(void)
9494
{
9595
if (ImGui::BeginTabItem("Background", NULL, ImGuiTabItemFlags_None))
9696
{
97-
ImGui::BeginChild("background_palettes", ImVec2(0, 0.0f), ImGuiChildFlags_None);
97+
ImGui::BeginChild("background_palettes", ImVec2(0, 0.0f), ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar);
9898
ImGui::PushFont(gui_default_font);
9999

100100
ImGui::NewLine();
@@ -144,7 +144,7 @@ void gui_debug_window_huc6260_palettes(void)
144144

145145
if (ImGui::BeginTabItem("Sprites", NULL, ImGuiTabItemFlags_None))
146146
{
147-
ImGui::BeginChild("sprite_palettes", ImVec2(0, 0.0f), ImGuiChildFlags_None);
147+
ImGui::BeginChild("sprite_palettes", ImVec2(0, 0.0f), ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar);
148148
ImGui::PushFont(gui_default_font);
149149

150150
ImGui::NewLine();

platforms/shared/desktop/gui_debug_huc6270.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ void gui_debug_window_huc6270_sprites(void)
371371
float scale = 4.0f;
372372

373373
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f);
374-
ImGui::SetNextWindowPos(ImVec2(79, 120), ImGuiCond_FirstUseEver);
375-
ImGui::SetNextWindowSize(ImVec2(547, 394), ImGuiCond_FirstUseEver);
374+
ImGui::SetNextWindowPos(ImVec2(78, 56), ImGuiCond_FirstUseEver);
375+
ImGui::SetNextWindowSize(ImVec2(546, 500), ImGuiCond_FirstUseEver);
376376
ImGui::Begin("HuC6270 Sprites", &config_debug.show_huc6270_sprites);
377377

378378
ImGui::PushFont(gui_default_font);

platforms/shared/desktop/gui_debug_huc6280.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
void gui_debug_window_huc6280(void)
3232
{
3333
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f);
34-
ImGui::SetNextWindowPos(ImVec2(6, 31), ImGuiCond_FirstUseEver);
34+
ImGui::SetNextWindowPos(ImVec2(3, 26), ImGuiCond_FirstUseEver);
3535

3636
ImGui::Begin("HuC6280", &config_debug.show_processor, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize);
3737

platforms/shared/desktop/gui_debug_memory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ void gui_debug_window_memory(void)
4343
}
4444

4545
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f);
46-
ImGui::SetNextWindowPos(ImVec2(625, 321), ImGuiCond_FirstUseEver);
47-
ImGui::SetNextWindowSize(ImVec2(343, 262), ImGuiCond_FirstUseEver);
46+
ImGui::SetNextWindowPos(ImVec2(60, 60), ImGuiCond_FirstUseEver);
47+
ImGui::SetNextWindowSize(ImVec2(670, 330), ImGuiCond_FirstUseEver);
4848

4949
ImGui::Begin("Memory Editor", &config_debug.show_memory, ImGuiWindowFlags_MenuBar);
5050

platforms/shared/desktop/gui_debug_psg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void gui_debug_window_psg(void)
5959

6060
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f);
6161
ImGui::SetNextWindowPos(ImVec2(180, 45), ImGuiCond_FirstUseEver);
62-
ImGui::SetNextWindowSize(ImVec2(438, 482), ImGuiCond_FirstUseEver);
62+
ImGui::SetNextWindowSize(ImVec2(444, 400), ImGuiCond_FirstUseEver);
6363
ImGui::Begin("PSG", &config_debug.show_psg);
6464

6565
GeargrafxCore* core = emu_get_core();

platforms/shared/desktop/gui_debug_trace_logger.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ static const int k_line_count[] = { 1000, 5000, 10000, 50000, 100000, 500000, 10
3939
void gui_debug_window_trace_logger(void)
4040
{
4141
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f);
42-
ImGui::SetNextWindowPos(ImVec2(625, 321), ImGuiCond_FirstUseEver);
43-
ImGui::SetNextWindowSize(ImVec2(343, 262), ImGuiCond_FirstUseEver);
42+
ImGui::SetNextWindowPos(ImVec2(340, 168), ImGuiCond_FirstUseEver);
43+
ImGui::SetNextWindowSize(ImVec2(342, 262), ImGuiCond_FirstUseEver);
4444

4545
ImGui::Begin("Trace Logger", &config_debug.show_trace_logger, ImGuiWindowFlags_MenuBar);
4646

@@ -74,7 +74,7 @@ void gui_debug_window_trace_logger(void)
7474
gui_debug_trace_logger_clear();
7575
}
7676

77-
if (ImGui::BeginChild("##logger", ImVec2(ImGui::GetContentRegionAvail().x, 0), true, 0))
77+
if (ImGui::BeginChild("##logger", ImVec2(ImGui::GetContentRegionAvail().x, 0), true, ImGuiWindowFlags_HorizontalScrollbar))
7878
{
7979
ImGui::PushFont(gui_default_font);
8080

0 commit comments

Comments
 (0)