From 1ad2c9039e9a0ff5ec5b93352f0a2bd92e1d2a76 Mon Sep 17 00:00:00 2001 From: Marco Elli Date: Sat, 24 Jan 2026 02:09:07 +0100 Subject: [PATCH] Improve UI feedback for help text visibility I've modified the populateCellForItemInSection function in RmHelpTextSettingsDialog.lua to provide better visual feedback in the settings menu: Dynamic Colors: The "On" and "Off" status texts now use colors for better readability. "On" is displayed in Green (0, 1, 0, 1), and "Off" is displayed in Red (1, 0, 0, 1). Increased Text Size: The font size for the toggle state has been increased to 0.025 to make it stand out more within the list. I hope you like these changes! --- scripts/gui/RmHelpTextSettingsDialog.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/gui/RmHelpTextSettingsDialog.lua b/scripts/gui/RmHelpTextSettingsDialog.lua index e6ac4dc..e5bfe75 100644 --- a/scripts/gui/RmHelpTextSettingsDialog.lua +++ b/scripts/gui/RmHelpTextSettingsDialog.lua @@ -207,9 +207,20 @@ function RmHelpTextSettingsDialog:populateCellForItemInSection(list, section, in end cell:getAttribute("secondaryText"):setText(secondaryText) - -- Toggle state (ON = visible, OFF = hidden) - local toggleText = entry.hidden and g_i18n:getText("ui_inputHelpVisibility_stateOff") or g_i18n:getText("ui_inputHelpVisibility_stateOn") - cell:getAttribute("toggleState"):setText(toggleText) + -- Toggle state (ON = visible, OFF = hidden) with dynamic colors + local toggleElement = cell:getAttribute("toggleState") + if entry.hidden then + -- Set text and color to Red if the help text is hidden + toggleElement:setText(g_i18n:getText("ui_inputHelpVisibility_stateOff")) + toggleElement:setTextColor(1, 0, 0, 1) -- Red (RGBA) + else + -- Set text and color to Green if the help text is visible + toggleElement:setText(g_i18n:getText("ui_inputHelpVisibility_stateOn")) + toggleElement:setTextColor(0, 1, 0, 1) -- Green (RGBA) + end + + -- Increase the font size for better visibility (default is usually around 0.02) + toggleElement:setTextSize(0.025) end end end