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:
@@ -5,6 +5,7 @@ return {
|
||||
owned_tooltip = true, -- show "Active combos" tooltip on owned jokers
|
||||
threshold = 4, -- total synergy score needed to recommend a card
|
||||
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)
|
||||
themes_found = {}, -- synergy themes the player has assembled (tags)
|
||||
}
|
||||
|
||||
@@ -188,12 +188,14 @@ local function tag_labels(tag_set)
|
||||
end
|
||||
|
||||
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 rows = {}
|
||||
local function text_row(str, colour)
|
||||
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
|
||||
|
||||
@@ -211,7 +213,7 @@ local function tooltip_rows(card)
|
||||
for i, l in ipairs(wrap_names(labels, 36, 2)) do
|
||||
rows[#rows + 1] = {{n = G.UIT.T, config = {
|
||||
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
|
||||
@@ -229,9 +231,9 @@ local function tooltip_rows(card)
|
||||
local reason = JCA.explain(key, p.key) or 'shared build theme'
|
||||
rows[#rows + 1] = {
|
||||
{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,
|
||||
colour = G.C.UI.TEXT_DARK, scale = 0.3}},
|
||||
colour = G.C.UI.TEXT_DARK, scale = 0.3 * S}},
|
||||
}
|
||||
end
|
||||
if #partners > shown then
|
||||
@@ -902,6 +904,12 @@ if SMODS.current_mod then
|
||||
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 = {
|
||||
create_option_cycle{
|
||||
label = 'Recommendation threshold (lower = more picks)',
|
||||
|
||||
Reference in New Issue
Block a user