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