Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions scripts/gui/RmHelpTextSettingsDialog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down