diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Templates.xml	Mon Oct 24 18:28:40 2016 -0400
@@ -0,0 +1,184 @@
+<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/
+..\FrameXML\UI.xsd">
+
+  <Script file="Templates.lua" />
+
+  <Font name="VeneerFont" />
+  <Font name="VeneerFont_Small" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="16" />
+
+  <Font name="VeneerFont_Large" font="Fonts\FRIZQT__.TTF"  outline="NORMAL" height="24" />
+  <Font name="VeneerNumberFontSmall" font="Fonts\ARIALN.ttf"  outline="NORMAL" height="12" />
+  <Font name="VeneerNumberFont" font="Fonts\ARIALN.ttf"  outline="NORMAL" height="14" />
+  <Font name="VeneerNumberFontLarge" font="Fonts\ARIALN.ttf"  outline="NORMAL" height="24" />
+  <Font name="VeneerHeaderFont" font="Fonts\FRIZQT__.TTF" outline="THICK" height="14" />
+  <Font name="VeneerHeader2Font" font="Fonts\FRIZQT__.TTF" outline="THICK" height="14">
+    <Color a="1" r="1" g="0.4" b="0" />
+  </Font>
+
+  <!-- generic animations -->
+  <Frame name="VeneerAnimations" virtual="true">
+    <Animations>
+      <AnimationGroup parentKey="BlockFade" looping="NONE" setToFinalAlpha="false">
+        <Alpha parentKey="alpha" order="1" duration="1"  fromAlpha="0.5" toAlpha="1" />
+        <Scripts>
+          <OnPlay>
+            VeneerAnimationMixin.OnPlay(self)
+          </OnPlay>
+        </Scripts>
+      </AnimationGroup>
+    </Animations>
+  </Frame>
+
+  <!-- mixin map -->
+  <Frame name="VeneerMixinScripts" virtual="true">
+    <Scripts>
+      <OnLoad method="OnLoad"  />
+      <OnEvent method="OnEvent" />
+      <OnUpdate method="OnUpdate" />
+      <OnShow method="OnShow" />
+      <OnHide method="OnHide" />
+      <OnMouseDown method="OnMouseDown" />
+      <OnSizeChanged method="OnSizeChanged" />
+    </Scripts>
+  </Frame>
+
+  <!-- colored-border object with minimal frame scripts -->
+  <Frame name="VeneerStatusButtonTemplate" virtual="true">
+    <Layers>
+      <Layer level="BORDER">
+        <Texture parentKey="bg" setAllPoints="true" parentArray="ConfigLayers" hidden="true" />
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString parentKey="label" inherits="VeneerNumberFontLarge" parentArray="ConfigLayers" hidden="true">
+          <Anchors>
+            <Anchor point="TOPLEFT" />
+          </Anchors>
+        </FontString>
+      </Layer>
+    </Layers>
+    <Frames>
+      <Button parentKey="resize" parentArray="ConfigLayers" hidden="true">
+        <Size x="48" y="16" />
+        <Anchors>
+          <Anchor point="BOTTOMRIGHT" />
+        </Anchors>
+        <NormalTexture setAllPoints="true">
+          <Color a="1" r="1" g="1" b="1" />
+        </NormalTexture>
+        <PushedTexture>
+          <Color a="1" r="1" g="0.5" b="1" />
+        </PushedTexture>
+      </Button>
+    </Frames>
+  </Frame>
+
+  <!-- same as above, but with a progress bar -->
+  <Frame name="VeneerStatusBarTemplate" virtual="true" hidden="true" inherits="VeneerMixinScripts">
+    <Scripts>
+      <OnShow>
+        if self.OnShow then self:OnShow() end
+        if self.Header:IsVisible() then
+          self.ProgressBG:ClearAllPoints()
+          self.ProgressBG:SetPoint('TOP', self.GlowLine, 'BOTTOM', 0, -1)
+          self.ProgressBG:SetPoint('LEFT')
+          self.ProgressBG:SetPoint('RIGHT')
+          self.ProgressBG:SetPoint('BOTTOM')
+        else
+          self.ProgressBG:ClearAllPoints()
+          self.ProgressBG:SetAllPoints(self)
+        end
+      </OnShow>
+      <OnSizeChanged>
+      </OnSizeChanged>
+    </Scripts>
+    <Layers>
+      <Layer level="BACKGROUND">
+        <Texture parentKey="UnderLay">
+
+        </Texture>
+      </Layer>
+      <Layer level="BORDER">
+        <Texture parentKey="ProgressBG" setAllPoints="true">
+          <Color a=".7" r="0" g="0" b="0" />
+        </Texture>
+        <Texture parentKey="GlowLine" atlas="AftLevelup-GlowLine" useAtlasSize="false">
+          <Size y="3" />
+          <Anchors>
+            <Anchor point="TOPLEFT" x="-27" y="-11" />
+            <Anchor point="RIGHT" x="27" y="0" />
+          </Anchors>
+        </Texture>
+      </Layer>
+      <Layer level="ARTWORK">
+        <Texture parentKey="ProgressBar">
+          <Anchors>
+            <Anchor point="BOTTOMLEFT" />
+          </Anchors>
+          <Color a="1" r=".7" g=".7" b=".7" />
+        </Texture>
+      </Layer>
+      <Layer level="OVERLAY" >
+        <FontString parentKey="Header" inherits="VeneerNumberFontSmall">
+          <Anchors>
+            <Anchor point="TOP" />
+          </Anchors>
+        </FontString>
+        <FontString parentKey="Level" inherits="GameFontNormal">
+          <Anchors>
+            <Anchor point="TOP" x="0" y="14" />
+          </Anchors>
+        </FontString>
+        <FontString parentKey="ProgressText" inherits="VeneerNumberFont">
+          <Anchors>
+            <Anchor point="CENTER" relativeKey="$parent.ProgressBG" />
+          </Anchors>
+        </FontString>
+      </Layer>
+    </Layers>
+  </Frame>
+
+  <Frame name="VeneerHandlerTemplate" inherits="VeneerAnimations" hidden="true" parent="UIParent" virtual="true">
+    <Layers>
+      <Layer level="BACKGROUND">
+        <Texture parentKey="Background" setAllPoints="true" parentArray="ConfigLayer">
+          <Color a="0.5" r="0" g="0" b="0" />
+        </Texture>
+      </Layer>
+    </Layers>
+    <Scripts>
+      <OnLoad method="OnLoad" />>
+      <OnEvent method="OnEvent" />
+      <OnShow method="OnShow" />
+      <OnHide method="OnHide" />
+    </Scripts>
+    <Frames>
+      <Frame name="$parentConfigHandler" setAllPoints="true" mixin="VeneerConfigLayerMixin" enableMouse="true" parentArray="ConfigLayer">
+        <Scripts>
+          <OnLoad method="OnLoad" />
+          <OnShow method="OnShow" />
+          <OnDragStart method="OnDragStart" />
+          <OnDragStop method="OnDragStop" />
+          <OnUpdate method="OnUpdate" />
+        </Scripts>
+        <Layers>
+          <Layer level="OVERLAY">
+            <FontString parentKey="ConfigName" parentArray="ConfigLayer" inherits="VeneerNumberFont">
+              <Anchors>
+                <Anchor point="TOPLEFT" />
+              </Anchors>
+            </FontString>
+            <FontString parentKey="ConfigID" parentArray="ConfigLayer" inherits="VeneerNumberFont">
+              <Anchors>
+                <Anchor point="BOTTOMLEFT" />
+              </Anchors>
+            </FontString>
+            <Texture setAllPoints="true" hidden="true">
+              <Color a="0.25" r="0" g="1" b="0" />
+            </Texture>
+          </Layer>
+        </Layers>
+      </Frame>
+    </Frames>
+  </Frame>
+
+</Ui>
\ No newline at end of file