Originally Posted by Carter_DC
first one, I can't get to have my tooltip on the BOTOMRIGHT... BOTOM works like a charm, but botomright displays the tooltip on the right... not botom... (that's not a really big issue)
|
This is due to how ZO_Tooltips_ShowTextTooltip translates the anchor point:
Lua Code:
local SIDE_TO_TOOLTIP_SIDE =
{
[TOP] = BOTTOM,
[BOTTOM] = TOP,
[left] = RIGHT,
[right] = LEFT,
}
function ZO_Tooltips_ShowTextTooltip(control, side, ...)
if side == nil then
InitializeTooltip(InformationTooltip)
ZO_Tooltips_SetupDynamicTooltipAnchors(InformationTooltip, control)
else
InitializeTooltip(InformationTooltip, control, SIDE_TO_TOOLTIP_SIDE[side], OFFSETS_X[side], OFFSETS_Y[side])
end
for i = 1, select("#", ...) do
local line = select(i, ...)
InformationTooltip:AddLine(line, "", ZO_TOOLTIP_DEFAULT_COLOR:UnpackRGB())
end
end
You can do the calls yourself for better control:
Lua Code:
InitializeTooltip(InformationTooltip, AT_Guild_ChatBtn, TOPLEFT, 0, 5, --[[ optional ]] BOTTOMRIGHT)
InformationTooltip:AddLine(AT_Guild.savedVariables.mainGuildName, "", ZO_TOOLTIP_DEFAULT_COLOR:UnpackRGB())