Files
Rinse/Templates.xml
2026-11-15 17:41:13 +01:00

284 lines
11 KiB
XML

<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Button name="RinseListButtonTemplate" virtual="true" hidden="true" toplevel="true">
<Size x="220" y="16"/>
<ButtonText name="$parentText">
<Anchors>
<Anchor point="LEFT"/>
</Anchors>
</ButtonText>
<NormalFont inherits="GameFontNormalLarge">
<Shadow/>
</NormalFont>
<DisabledFont inherits="GameFontDisable"/>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT">
<Offset x="-10" y="0"/>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
this:RegisterForDrag("LeftButton")
this:RegisterForClicks("LeftButtonUp", "RightButtonUp")
</OnLoad>
<OnClick>
RinseListButton_OnClick()
</OnClick>
<OnDragStart>
RinseListButton_OnDragStart()
</OnDragStart>
<OnDragStop>
RinseListButton_OnDragStop()
</OnDragStop>
<OnEnter>
_G[this:GetName().."Highlight"]:Show()
GameTooltip_SetDefaultAnchor(GameTooltip, this)
GameTooltip:SetText(Rinse.L["Left-click and drag to swap\nRight-click to remove"], nil, nil, nil, nil, 1)
</OnEnter>
<OnLeave>
_G[this:GetName().."Highlight"]:Hide()
GameTooltip:Hide()
</OnLeave>
</Scripts>
</Button>
<Button name="RinseOptionsButtonTemplate" virtual="true" hidden="true" toplevel="true">
<Size x="160" y="16"/>
<ButtonText name="$parentText">
<Anchors>
<Anchor point="LEFT"/>
</Anchors>
</ButtonText>
<NormalFont inherits="GameFontNormal">
<Shadow/>
</NormalFont>
<HighlightFont inherits="GameFontHighlight">
<Shadow/>
</HighlightFont>
<DisabledFont inherits="GameFontDisable"/>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT">
<Offset x="-10" y="0"/>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnClick>
RinseOptionsScrollFrameButton_OnClick()
</OnClick>
<OnEnter>
_G[this:GetName().."Highlight"]:Show()
</OnEnter>
<OnLeave>
_G[this:GetName().."Highlight"]:Hide()
</OnLeave>
</Scripts>
</Button>
<Button name="RinseDebuffButtonTemplate" virtual="true" hidden="true" toplevel="true">
<Size x="200" y="42"/>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" tile="true">
<TileSize val="16"/>
<BackgroundInsets left="5" right="5" top="0" bottom="0"/>
<Color r="0" g="0" b="0"/>
</Backdrop>
<Layers>
<Layer level="BORDER">
<Texture name="$parentIcon">
<Size x="32" y="32"/>
<Anchors>
<Anchor point="LEFT">
<Offset x="10" y="0"/>
</Anchor>
</Anchors>
</Texture>
<FontString name="$parentPlayer" inherits="GameFontNormalLarge" justifyH="LEFT">
<Size x="150" y="20"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentIcon" relativePoint="TOPRIGHT">
<Offset x="5" y="3"/>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentName" inherits="GameFontNormalSmall" justifyH="LEFT">
<Size x="200" y="20"/>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentIcon" relativePoint="RIGHT">
<Offset x="5" y="-8"/>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parentCount" inherits="NumberFontNormalLarge" justifyH="RIGHT" outline="THICK">
<Anchors>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentIcon"/>
</Anchors>
<Color r="1" g="0" b="0"/>
<Shadow/>
</FontString>
<Texture name="$parentBorder" file="Interface\Buttons\UI-Debuff-Overlays">
<Size x="34" y="32"/>
<Anchors>
<Anchor point="CENTER" relativeTo="$parentIcon"/>
</Anchors>
<TexCoords left="0.296875" right="0.5703125" top="0" bottom="0.515625"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture name="$parentPriority" file="Interface\GossipFrame\AvailableQuestIcon">
<Size x="16" y="16"/>
<Anchors>
<Anchor point="TOPLEFT"><Offset x="3" y="-3"/></Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<HighlightTexture inherits="DialogButtonHighlightTexture"/>
<Scripts>
<OnLoad>
Rinse_DebuffButton_OnLoad(this)
</OnLoad>
<OnClick>
Rinse_Cleanse(this)
</OnClick>
<OnEnter>
if this.unit then
GameTooltip:SetOwner(this, "ANCHOR_TOPLEFT")
GameTooltip:SetUnitDebuff(this.unit, this.debuffIndex)
GameTooltip:Show()
end
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
<OnShow>
this:SetAlpha(1)
</OnShow>
</Scripts>
</Button>
<CheckButton name="RinseOptionsCheckButtonTemplate" inherits="OptionsCheckButtonTemplate" virtual="true">
<Size x="32" y="32"/>
<HitRectInsets left="0" right="-120" top="5" bottom="5"/>
<Frames>
<Frame name="$parentTooltipPreserve" enableMouse="true" hidden="true">
<Size x="152" y="22"/>
<Anchors>
<Anchor point="LEFT" relativePoint="LEFT"/>
</Anchors>
<Scripts>
<OnEnter>
if this:GetParent().tooltipText then
GameTooltip:SetOwner(this:GetParent(), "ANCHOR_RIGHT")
GameTooltip:SetText(this:GetParent().tooltipText, nil, nil, nil, nil, 1)
end
if this:GetParent().tooltipRequirement then
GameTooltip:AddLine(this:GetParent().tooltipRequirement, nil, nil, nil, 1)
GameTooltip:Show()
end
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnEnter>
local text = _G[this:GetName().."Text"]
this.r, this.g, this.b = text:GetTextColor()
text:SetTextColor(1, 1, 1)
if this.tooltipText then
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1)
end
if this.tooltipRequirement then
GameTooltip:AddLine(this.tooltipRequirement, nil, nil, nil, 1)
GameTooltip:Show()
end
</OnEnter>
<OnLeave>
_G[this:GetName().."Text"]:SetTextColor(this.r, this.g, this.b)
GameTooltip:Hide()
</OnLeave>
</Scripts>
</CheckButton>
<Slider name="RinseOptionsSliderTemplate" inherits="OptionsSliderTemplate" virtual="true">
<Scripts>
<OnEnter>
local text = _G[this:GetName().."Text"]
this.r, this.g, this.b = text:GetTextColor()
text:SetTextColor(1, 1, 1)
if this.tooltipText then
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1)
end
if this.tooltipRequirement then
GameTooltip:AddLine(this.tooltipRequirement, nil, nil, nil, 1)
GameTooltip:Show()
end
</OnEnter>
<OnLeave>
_G[this:GetName().."Text"]:SetTextColor(this.r, this.g, this.b)
GameTooltip:Hide()
</OnLeave>
</Scripts>
</Slider>
<ScrollFrame name="RinseScrollFrameTemplate" inherits="FauxScrollFrameTemplate" virtual="true">
<Frames>
<Frame enableMouse="false">
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize val="16"/>
<TileSize val="16"/>
<BackgroundInsets left="5" right="5" top="5" bottom="5"/>
<Color r="0" g="0" b="0"/>
</Backdrop>
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="-6" y="8"/>
</Anchor>
<Anchor point="BOTTOMRIGHT">
<Offset x="30" y="-8"/>
</Anchor>
</Anchors>
<Scripts>
<!-- Keep it visible -->
<OnLoad>
this:SetParent(this:GetParent():GetParent())
</OnLoad>
</Scripts>
</Frame>
<Frame enableMouse="false">
<Backdrop edgeFile="Interface\Buttons\UI-SliderBar-Border">
<EdgeSize val="8"/>
</Backdrop>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentScrollBarScrollUpButton">
<Offset x="-4" y="6"/>
</Anchor>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentScrollBarScrollDownButton">
<Offset x="4" y="-6"/>
</Anchor>
</Anchors>
</Frame>
</Frames>
<Scripts>
<OnVerticalScroll>
FauxScrollFrame_OnVerticalScroll(this.buttonHeight or 16, this.Update)
</OnVerticalScroll>
<OnShow>
this.Update()
</OnShow>
</Scripts>
</ScrollFrame>
</Ui>