annotate Templates.xml @ 90:6e2cb847c3c6

Implement a mixin template for the basic visual config widgets.
author Nenue
date Mon, 24 Oct 2016 18:28:40 -0400
parents
children 5476337198ec
rev   line source
Nenue@90 1 <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
Nenue@90 2 ..\FrameXML\UI.xsd">
Nenue@90 3
Nenue@90 4 <Script file="Templates.lua" />
Nenue@90 5
Nenue@90 6 <Font name="VeneerFont" />
Nenue@90 7 <Font name="VeneerFont_Small" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="16" />
Nenue@90 8
Nenue@90 9 <Font name="VeneerFont_Large" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="24" />
Nenue@90 10 <Font name="VeneerNumberFontSmall" font="Fonts\ARIALN.ttf" outline="NORMAL" height="12" />
Nenue@90 11 <Font name="VeneerNumberFont" font="Fonts\ARIALN.ttf" outline="NORMAL" height="14" />
Nenue@90 12 <Font name="VeneerNumberFontLarge" font="Fonts\ARIALN.ttf" outline="NORMAL" height="24" />
Nenue@90 13 <Font name="VeneerHeaderFont" font="Fonts\FRIZQT__.TTF" outline="THICK" height="14" />
Nenue@90 14 <Font name="VeneerHeader2Font" font="Fonts\FRIZQT__.TTF" outline="THICK" height="14">
Nenue@90 15 <Color a="1" r="1" g="0.4" b="0" />
Nenue@90 16 </Font>
Nenue@90 17
Nenue@90 18 <!-- generic animations -->
Nenue@90 19 <Frame name="VeneerAnimations" virtual="true">
Nenue@90 20 <Animations>
Nenue@90 21 <AnimationGroup parentKey="BlockFade" looping="NONE" setToFinalAlpha="false">
Nenue@90 22 <Alpha parentKey="alpha" order="1" duration="1" fromAlpha="0.5" toAlpha="1" />
Nenue@90 23 <Scripts>
Nenue@90 24 <OnPlay>
Nenue@90 25 VeneerAnimationMixin.OnPlay(self)
Nenue@90 26 </OnPlay>
Nenue@90 27 </Scripts>
Nenue@90 28 </AnimationGroup>
Nenue@90 29 </Animations>
Nenue@90 30 </Frame>
Nenue@90 31
Nenue@90 32 <!-- mixin map -->
Nenue@90 33 <Frame name="VeneerMixinScripts" virtual="true">
Nenue@90 34 <Scripts>
Nenue@90 35 <OnLoad method="OnLoad" />
Nenue@90 36 <OnEvent method="OnEvent" />
Nenue@90 37 <OnUpdate method="OnUpdate" />
Nenue@90 38 <OnShow method="OnShow" />
Nenue@90 39 <OnHide method="OnHide" />
Nenue@90 40 <OnMouseDown method="OnMouseDown" />
Nenue@90 41 <OnSizeChanged method="OnSizeChanged" />
Nenue@90 42 </Scripts>
Nenue@90 43 </Frame>
Nenue@90 44
Nenue@90 45 <!-- colored-border object with minimal frame scripts -->
Nenue@90 46 <Frame name="VeneerStatusButtonTemplate" virtual="true">
Nenue@90 47 <Layers>
Nenue@90 48 <Layer level="BORDER">
Nenue@90 49 <Texture parentKey="bg" setAllPoints="true" parentArray="ConfigLayers" hidden="true" />
Nenue@90 50 </Layer>
Nenue@90 51 <Layer level="OVERLAY">
Nenue@90 52 <FontString parentKey="label" inherits="VeneerNumberFontLarge" parentArray="ConfigLayers" hidden="true">
Nenue@90 53 <Anchors>
Nenue@90 54 <Anchor point="TOPLEFT" />
Nenue@90 55 </Anchors>
Nenue@90 56 </FontString>
Nenue@90 57 </Layer>
Nenue@90 58 </Layers>
Nenue@90 59 <Frames>
Nenue@90 60 <Button parentKey="resize" parentArray="ConfigLayers" hidden="true">
Nenue@90 61 <Size x="48" y="16" />
Nenue@90 62 <Anchors>
Nenue@90 63 <Anchor point="BOTTOMRIGHT" />
Nenue@90 64 </Anchors>
Nenue@90 65 <NormalTexture setAllPoints="true">
Nenue@90 66 <Color a="1" r="1" g="1" b="1" />
Nenue@90 67 </NormalTexture>
Nenue@90 68 <PushedTexture>
Nenue@90 69 <Color a="1" r="1" g="0.5" b="1" />
Nenue@90 70 </PushedTexture>
Nenue@90 71 </Button>
Nenue@90 72 </Frames>
Nenue@90 73 </Frame>
Nenue@90 74
Nenue@90 75 <!-- same as above, but with a progress bar -->
Nenue@90 76 <Frame name="VeneerStatusBarTemplate" virtual="true" hidden="true" inherits="VeneerMixinScripts">
Nenue@90 77 <Scripts>
Nenue@90 78 <OnShow>
Nenue@90 79 if self.OnShow then self:OnShow() end
Nenue@90 80 if self.Header:IsVisible() then
Nenue@90 81 self.ProgressBG:ClearAllPoints()
Nenue@90 82 self.ProgressBG:SetPoint('TOP', self.GlowLine, 'BOTTOM', 0, -1)
Nenue@90 83 self.ProgressBG:SetPoint('LEFT')
Nenue@90 84 self.ProgressBG:SetPoint('RIGHT')
Nenue@90 85 self.ProgressBG:SetPoint('BOTTOM')
Nenue@90 86 else
Nenue@90 87 self.ProgressBG:ClearAllPoints()
Nenue@90 88 self.ProgressBG:SetAllPoints(self)
Nenue@90 89 end
Nenue@90 90 </OnShow>
Nenue@90 91 <OnSizeChanged>
Nenue@90 92 </OnSizeChanged>
Nenue@90 93 </Scripts>
Nenue@90 94 <Layers>
Nenue@90 95 <Layer level="BACKGROUND">
Nenue@90 96 <Texture parentKey="UnderLay">
Nenue@90 97
Nenue@90 98 </Texture>
Nenue@90 99 </Layer>
Nenue@90 100 <Layer level="BORDER">
Nenue@90 101 <Texture parentKey="ProgressBG" setAllPoints="true">
Nenue@90 102 <Color a=".7" r="0" g="0" b="0" />
Nenue@90 103 </Texture>
Nenue@90 104 <Texture parentKey="GlowLine" atlas="AftLevelup-GlowLine" useAtlasSize="false">
Nenue@90 105 <Size y="3" />
Nenue@90 106 <Anchors>
Nenue@90 107 <Anchor point="TOPLEFT" x="-27" y="-11" />
Nenue@90 108 <Anchor point="RIGHT" x="27" y="0" />
Nenue@90 109 </Anchors>
Nenue@90 110 </Texture>
Nenue@90 111 </Layer>
Nenue@90 112 <Layer level="ARTWORK">
Nenue@90 113 <Texture parentKey="ProgressBar">
Nenue@90 114 <Anchors>
Nenue@90 115 <Anchor point="BOTTOMLEFT" />
Nenue@90 116 </Anchors>
Nenue@90 117 <Color a="1" r=".7" g=".7" b=".7" />
Nenue@90 118 </Texture>
Nenue@90 119 </Layer>
Nenue@90 120 <Layer level="OVERLAY" >
Nenue@90 121 <FontString parentKey="Header" inherits="VeneerNumberFontSmall">
Nenue@90 122 <Anchors>
Nenue@90 123 <Anchor point="TOP" />
Nenue@90 124 </Anchors>
Nenue@90 125 </FontString>
Nenue@90 126 <FontString parentKey="Level" inherits="GameFontNormal">
Nenue@90 127 <Anchors>
Nenue@90 128 <Anchor point="TOP" x="0" y="14" />
Nenue@90 129 </Anchors>
Nenue@90 130 </FontString>
Nenue@90 131 <FontString parentKey="ProgressText" inherits="VeneerNumberFont">
Nenue@90 132 <Anchors>
Nenue@90 133 <Anchor point="CENTER" relativeKey="$parent.ProgressBG" />
Nenue@90 134 </Anchors>
Nenue@90 135 </FontString>
Nenue@90 136 </Layer>
Nenue@90 137 </Layers>
Nenue@90 138 </Frame>
Nenue@90 139
Nenue@90 140 <Frame name="VeneerHandlerTemplate" inherits="VeneerAnimations" hidden="true" parent="UIParent" virtual="true">
Nenue@90 141 <Layers>
Nenue@90 142 <Layer level="BACKGROUND">
Nenue@90 143 <Texture parentKey="Background" setAllPoints="true" parentArray="ConfigLayer">
Nenue@90 144 <Color a="0.5" r="0" g="0" b="0" />
Nenue@90 145 </Texture>
Nenue@90 146 </Layer>
Nenue@90 147 </Layers>
Nenue@90 148 <Scripts>
Nenue@90 149 <OnLoad method="OnLoad" />>
Nenue@90 150 <OnEvent method="OnEvent" />
Nenue@90 151 <OnShow method="OnShow" />
Nenue@90 152 <OnHide method="OnHide" />
Nenue@90 153 </Scripts>
Nenue@90 154 <Frames>
Nenue@90 155 <Frame name="$parentConfigHandler" setAllPoints="true" mixin="VeneerConfigLayerMixin" enableMouse="true" parentArray="ConfigLayer">
Nenue@90 156 <Scripts>
Nenue@90 157 <OnLoad method="OnLoad" />
Nenue@90 158 <OnShow method="OnShow" />
Nenue@90 159 <OnDragStart method="OnDragStart" />
Nenue@90 160 <OnDragStop method="OnDragStop" />
Nenue@90 161 <OnUpdate method="OnUpdate" />
Nenue@90 162 </Scripts>
Nenue@90 163 <Layers>
Nenue@90 164 <Layer level="OVERLAY">
Nenue@90 165 <FontString parentKey="ConfigName" parentArray="ConfigLayer" inherits="VeneerNumberFont">
Nenue@90 166 <Anchors>
Nenue@90 167 <Anchor point="TOPLEFT" />
Nenue@90 168 </Anchors>
Nenue@90 169 </FontString>
Nenue@90 170 <FontString parentKey="ConfigID" parentArray="ConfigLayer" inherits="VeneerNumberFont">
Nenue@90 171 <Anchors>
Nenue@90 172 <Anchor point="BOTTOMLEFT" />
Nenue@90 173 </Anchors>
Nenue@90 174 </FontString>
Nenue@90 175 <Texture setAllPoints="true" hidden="true">
Nenue@90 176 <Color a="0.25" r="0" g="1" b="0" />
Nenue@90 177 </Texture>
Nenue@90 178 </Layer>
Nenue@90 179 </Layers>
Nenue@90 180 </Frame>
Nenue@90 181 </Frames>
Nenue@90 182 </Frame>
Nenue@90 183
Nenue@90 184 </Ui>