Touch mode: enlarge advice tooltip text (1.4x) with config toggle

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Code
2026-07-10 10:34:36 -07:00
parent 35e54e6976
commit 172a716649
2 changed files with 13 additions and 4 deletions
+1
View File
@@ -5,6 +5,7 @@ return {
owned_tooltip = true, -- show "Active combos" tooltip on owned jokers owned_tooltip = true, -- show "Active combos" tooltip on owned jokers
threshold = 4, -- total synergy score needed to recommend a card threshold = 4, -- total synergy score needed to recommend a card
learning_mode = false, -- hide verdicts (pulse, "Strong pick!"), keep reasons learning_mode = false, -- hide verdicts (pulse, "Strong pick!"), keep reasons
touch_mode = true, -- enlarge advice text/buttons for phone screens
discovered = {}, -- famous pairs the player has fielded (pair keys) discovered = {}, -- famous pairs the player has fielded (pair keys)
themes_found = {}, -- synergy themes the player has assembled (tags) themes_found = {}, -- synergy themes the player has assembled (tags)
} }
+12 -4
View File
@@ -188,12 +188,14 @@ local function tag_labels(tag_set)
end end
local function tooltip_rows(card) local function tooltip_rows(card)
-- Touch mode enlarges every advice row for phone screens (see config.lua).
local S = JCA.config.touch_mode and 1.4 or 1
local partners, total = JCA.partners_for(card) local partners, total = JCA.partners_for(card)
local rows = {} local rows = {}
local function text_row(str, colour) local function text_row(str, colour)
rows[#rows + 1] = {{n = G.UIT.T, config = { rows[#rows + 1] = {{n = G.UIT.T, config = {
text = str, colour = colour or G.C.UI.TEXT_DARK, scale = 0.32, text = str, colour = colour or G.C.UI.TEXT_DARK, scale = 0.32 * S,
}}} }}}
end end
@@ -211,7 +213,7 @@ local function tooltip_rows(card)
for i, l in ipairs(wrap_names(labels, 36, 2)) do for i, l in ipairs(wrap_names(labels, 36, 2)) do
rows[#rows + 1] = {{n = G.UIT.T, config = { rows[#rows + 1] = {{n = G.UIT.T, config = {
text = (i == 1 and prefix or ' ') .. l, text = (i == 1 and prefix or ' ') .. l,
colour = G.C.UI.TEXT_DARK, scale = 0.3, colour = G.C.UI.TEXT_DARK, scale = 0.3 * S,
}}} }}}
end end
end end
@@ -229,9 +231,9 @@ local function tooltip_rows(card)
local reason = JCA.explain(key, p.key) or 'shared build theme' local reason = JCA.explain(key, p.key) or 'shared build theme'
rows[#rows + 1] = { rows[#rows + 1] = {
{n = G.UIT.T, config = {text = p.name .. ': ', {n = G.UIT.T, config = {text = p.name .. ': ',
colour = G.C.RED, scale = 0.3}}, colour = G.C.RED, scale = 0.3 * S}},
{n = G.UIT.T, config = {text = reason, {n = G.UIT.T, config = {text = reason,
colour = G.C.UI.TEXT_DARK, scale = 0.3}}, colour = G.C.UI.TEXT_DARK, scale = 0.3 * S}},
} }
end end
if #partners > shown then if #partners > shown then
@@ -902,6 +904,12 @@ if SMODS.current_mod then
ref_table = JCA.config, ref_value = 'learning_mode', ref_table = JCA.config, ref_value = 'learning_mode',
}, },
}}, }},
{n = G.UIT.R, config = {align = 'cm', padding = 0.05}, nodes = {
create_toggle{
label = 'Touch mode (larger advice text & buttons)',
ref_table = JCA.config, ref_value = 'touch_mode',
},
}},
{n = G.UIT.R, config = {align = 'cm', padding = 0.05}, nodes = { {n = G.UIT.R, config = {align = 'cm', padding = 0.05}, nodes = {
create_option_cycle{ create_option_cycle{
label = 'Recommendation threshold (lower = more picks)', label = 'Recommendation threshold (lower = more picks)',