Module:AbilityHints: Difference between revisionsGive feedback
m support manual ability hints |
Move hint icon positioning to a class and add action sentences to hint tooltips (with help from vergir-bot LLM) |
||
| Line 22: | Line 22: | ||
local function icon_img(file, link) | local function icon_img(file, link) | ||
return '<span | return '<span class="ability-hint-icon">[[File:' .. file .. '|24px|link=' .. link .. ']]</span>' | ||
end | end | ||
local function hint_icon(def) | local function hint_icon(def) | ||
return '<span class="ability-hint">' .. icon_img(def.file, def.link) | return '<span class="ability-hint">' .. icon_img(def.file, def.link) | ||
.. '<span class="ability-hint-tip">' .. def.tip .. '</span></span> | .. '<span class="ability-hint-tip">' .. def.tip .. ". Click to go to item's page</span></span>" | ||
end | end | ||
| Line 34: | Line 34: | ||
if m.disabled then cls = cls .. ' ability-hint--disabled' end | if m.disabled then cls = cls .. ' ability-hint--disabled' end | ||
return '<span class="' .. cls .. '">' .. icon_img(m.file, '#' .. m.anchor) | return '<span class="' .. cls .. '">' .. icon_img(m.file, '#' .. m.anchor) | ||
.. '<span class="ability-hint-tip">' .. m.title .. ' Interaction. Click to | .. '<span class="ability-hint-tip">' .. m.title .. ' Interaction. Click to reveal more info</span></span>' | ||
end | end | ||