Missing BrowserButtonTemplate
Solanya opened this issue ยท 1 comments
Part 2 of the missing UI elements, the button here:
https://github.com/Ellypse/Storyline/blob/735e7f09bf464dcd3d5642036070371e85727d0d/ui.xml#L605
inherits a template that was removed in 9.0.2 when they replaced the help frame. If you want to copy the previous behaviour, here's the template, although there might be other square buttons with the same behaviour:
<Button name="BrowserButtonTemplate" virtual="true">
<Size x="32" y="32"/>
<NormalTexture file="Interface\Buttons\UI-SquareButton-Up"/>
<PushedTexture file="Interface\Buttons\UI-SquareButton-Down"/>
<DisabledTexture file="Interface\Buttons\UI-SquareButton-Disabled"/>
<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
<Scripts>
<OnMouseDown>
local point, relativeTo, relativePoint, x, y = self.Icon:GetPoint(1);
self.origX = x;
self.origY = y;
self.Icon:SetPoint(point, relativeTo, relativePoint, x-1, y-1);
</OnMouseDown>
<OnMouseUp>
local point, relativeTo, relativePoint = self.Icon:GetPoint(1);
self.Icon:SetPoint(point, relativeTo, relativePoint, self.origX, self.origY);
</OnMouseUp>
<OnHide>
local point, relativeTo, relativePoint = self.Icon:GetPoint(1);
self.Icon:SetPoint(point, relativeTo, relativePoint, self.origX, self.origY);
</OnHide>
<OnEnter>
if (self.tooltip) then
GameTooltip:SetOwner(self, "ANCHOR_CURSOR_RIGHT");
GameTooltip:SetText(self.tooltip, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
end
</OnEnter>
<OnLeave function="GameTooltip_Hide" />
</Scripts>
</Button>