From 4dc3f554ae17d90224f40722d020ed89588ef11e Mon Sep 17 00:00:00 2001 From: tomvita <68505331+tomvita@users.noreply.github.com> Date: Tue, 8 Mar 2022 19:21:33 +0800 Subject: [PATCH] fix memory explorer color when in main for dark theme --- include/theme.h | 1 + source/guis/gui_cheats.cpp | 2 +- source/theme.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/theme.h b/include/theme.h index d730154..5f6b368 100644 --- a/include/theme.h +++ b/include/theme.h @@ -10,6 +10,7 @@ typedef struct { color_t textColor; color_t unselectedColor; color_t backgroundColor; + color_t mainbackgroundColor; color_t highlightColor; color_t selectedColor; color_t separatorColor; diff --git a/source/guis/gui_cheats.cpp b/source/guis/gui_cheats.cpp index b382feb..6b1960d 100644 --- a/source/guis/gui_cheats.cpp +++ b/source/guis/gui_cheats.cpp @@ -1489,7 +1489,7 @@ void GuiCheats::drawEditRAMMenu2() if (m_searchMenuLocation != SEARCH_editRAM2) return; if (m_EditorBaseAddr >= m_mainBaseAddr && m_EditorBaseAddr <= m_mainend) - Gui::drawRectangle(0, 0, Gui::g_framebuffer_width, Gui::g_framebuffer_height, Gui::makeColor(0xFF, 0xFF, 0xC0, 0x40)); + Gui::drawRectangle(0, 0, Gui::g_framebuffer_width, Gui::g_framebuffer_height, currTheme.mainbackgroundColor); else Gui::drawRectangle(0, 0, Gui::g_framebuffer_width, Gui::g_framebuffer_height, currTheme.backgroundColor); //background Gui::drawText(font24, 30, 10 , currTheme.textColor, "\uE132 Memory Explorer"); diff --git a/source/theme.c b/source/theme.c index e6e9c42..a5e5ded 100644 --- a/source/theme.c +++ b/source/theme.c @@ -11,6 +11,7 @@ void setTheme(ColorSetId colorSetId) { .textColor = RGBA8(0x00, 0x00, 0x00, 0xFF), .unselectedColor = RGBA8(0xB4, 0xB4, 0xB4, 0xFF), .backgroundColor = RGBA8(0xEA, 0xEA, 0xEA, 0xFF), + .mainbackgroundColor = RGBA8(0xFF, 0xFF, 0xC0, 0x40), .highlightColor = RGBA8(0x27, 0xA3, 0xC7, 0xFF), .selectedColor = RGBA8(0x50, 0x2D, 0xE4, 0xFF), .separatorColor = RGBA8(0xA0, 0xA0, 0xA0, 0xFF), @@ -29,6 +30,7 @@ void setTheme(ColorSetId colorSetId) { .textColor = RGBA8(0xFF, 0xFF, 0xFF, 0xFF), .unselectedColor = RGBA8(0x6C, 0x6C, 0x6C, 0xFF), .backgroundColor = RGBA8(0x31, 0x31, 0x31, 0xFF), + .mainbackgroundColor = RGBA8(0x80, 0x80, 0xC0, 0x40), .highlightColor = RGBA8(0x27, 0xA3, 0xC7, 0xFF), .selectedColor = RGBA8(0x59, 0xED, 0xC0, 0xFF), .separatorColor = RGBA8(0x60, 0x60, 0x60, 0xFF),