diff Turok/Layout/Dialog.xml @ 6:a9b8b0866ece

clear out log jam
author Nenue
date Sun, 21 Feb 2016 08:32:53 -0500
parents
children 9400a0ff8540
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Turok/Layout/Dialog.xml	Sun Feb 21 08:32:53 2016 -0500
@@ -0,0 +1,462 @@
+<Ui>
+  <!-- Visual element structures for configuration interfaces  -->
+  <Script file="Dialog.lua" />
+  <Font name="TkDialogFieldFont" font="Interface\Addons\Turok\Media\font\ArchivoNarrow-Bold.ttf" outline="NORMAL">
+    <Color r="1" g="1" b="1" a="1" />
+    <FontHeight>
+      <AbsValue val="13"/>
+    </FontHeight>
+  </Font>
+
+
+  <Button name="TurokButton" virtual="true" parentArray="buttons" enableMouse="true">
+    <Scripts>
+      <OnShow>
+        self:RegisterForClicks("LeftButtonUp")
+        self.bname:SetText(self:GetName():match("_(%a+)$"))
+      </OnShow>
+      <OnClick>
+        self:GetParent().Click(self, self:GetParent())
+      </OnClick>
+    </Scripts>
+    <NormalTexture setAllPoints="true">
+      <Color r="0" g="0" b="0" a="1" />
+    </NormalTexture>
+    <PushedTexture setAllPoints="true" alphaMode="ADD">
+      <Color r="1" g="0.5" b="0" a="1" />
+    </PushedTexture>
+    <HighlightTexture setAllPoints="true" alphaMode="ADD">
+      <Color r="0.5" g="0.1" b=".4" a="1" />
+    </HighlightTexture>
+    <DisabledTexture setAllPoints="true">
+      <Color r="0.4" g="0.4" b="0.4" a="1" />
+    </DisabledTexture>
+    <Size x="100" y="20" />
+    <Layers>
+      <Layer level="BACKDROP">
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString inherits="TurokFont" parentKey="bname" justifyH="CENTER" justifyV="MIDDLE" setAllPoints="true" text="Foo" />
+      </Layer>
+      <Layer level="HIGHLIGHT">
+      </Layer>
+    </Layers>
+  </Button>
+
+  <Frame name="TurokDialogMenu" parent="UIParent" enableMouse="true" hidden="true">
+    <Size x="200" y="200" />
+    <Anchors>
+      <Anchor point="TOPLEFT" />
+    </Anchors>
+    <Layers>
+      <Layer level="BACKGROUND">
+        <Texture setAllPoints="true">
+          <Color r="0" g="0" b="0" a="0.2" />
+        </Texture>
+      </Layer>
+    </Layers>
+  </Frame>
+
+  <CheckButton name="TurokCheckButton" virtual="true" enableMouse="true">
+    <Scripts>
+      <OnClick>
+        if self:GetParent().Check then
+          self:GetParent().Check(self, self:GetParent())
+        else
+          self:GetParent():GetParent().Check(self, self:GetParent(), self:GetParent():GetParent())
+        end
+      </OnClick>
+    </Scripts>
+    <NormalTexture>
+      <Color r="0.3" g="0.05" b="0.6" a="1" />
+      <Size x="16" y="16" />
+      <Anchors>
+        <Anchor point="TOPLEFT" x="2" y="-2" />
+      </Anchors>
+    </NormalTexture>
+    <PushedTexture>
+      <Color r="0" g="0" b="0" a="1" />
+      <Size x="16" y="16" />
+      <Anchors>
+        <Anchor point="TOPLEFT" x="2" y="-2" />
+      </Anchors>
+    </PushedTexture>
+    <HighlightTexture>
+      <Color r="1" g="0" b="0" a="0.1" />
+      <Size x="16" y="16" />
+      <Anchors>
+        <Anchor point="TOPLEFT" x="2" y="-2" />
+      </Anchors>
+    </HighlightTexture>
+    <CheckedTexture>
+      <Color r="1" g="1" b="0.5" a="1" />
+      <Size x="16" y="16" />
+      <Anchors>
+        <Anchor point="TOPLEFT" x="2" y="-2" />
+      </Anchors>
+    </CheckedTexture>
+
+    <DisabledCheckedTexture>
+      <Color r="0.7" g=".7" b=".7" a="1" />
+      <Size x="18" y="18" />
+      <Anchor point="TOPLEFT" />
+    </DisabledCheckedTexture>
+  </CheckButton>
+
+  <CheckButton name="TurokCheckButtonInline" inherits="TurokCheckButton" virtual="true" enableMouse="true">
+    <Size x="20" y="20" />
+    <Layers>
+      <Layer level="BORDER">
+        <Texture name="$parentBorder">
+          <Anchors>
+            <Anchor point="TOPLEFT" x="1" y="-1" />
+            <Anchor point="BOTTOMRIGHT" x="-1" y="1" />
+          </Anchors>
+          <Size x="18" y="18" />
+          <Color r="1" g="1" b="1" a="1" />
+          <Gradient>
+            <MinColor r="1" g="0" b=".5" a="1" />
+            <MaxColor r="0.5" g="0.9" b="1" a="1" />
+          </Gradient>
+        </Texture>
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString name="$parentDescText" inherits="TurokFontDetail" justifyH="LEFT" parentKey="description" text="Inline CheckButton">
+          <Anchors>
+            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="4" y="-3" />
+          </Anchors>
+        </FontString>
+      </Layer>
+    </Layers>
+  </CheckButton>
+
+  <!-- CheckButton designed to collapse on top of an EditBox -->
+  <CheckButton name="TurokCheckButtonOverlay" inherits="TurokCheckButton" virtual="true" enableMouse="true" frameStrata="HIGH">
+    <Size x="20" y="48" />
+    <Layers>
+      <Layer level="BORDER">
+        <Texture name="$parentBorder">
+          <Size x="18" y="18" />
+          <Anchors>
+            <Anchor point="TOPLEFT" x="1" y="-1" />
+          </Anchors>
+          <Color r="1" g="1" b="1" a="1" />
+          <Gradient>
+            <MinColor r="1" g="0" b=".5" a="1" />
+            <MaxColor r="0.5" g="0.9" b="1" a="1" />
+          </Gradient>
+        </Texture>
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString name="$parentDescText" inherits="TurokFontDetail" justifyH="LEFT" parentKey="description" text="Overlay CheckButton">
+          <Anchors>
+            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="4" y="-3" />
+          </Anchors>
+        </FontString>
+      </Layer>
+    </Layers>
+  </CheckButton>
+
+  <Frame name="TurokDialogFrame" parent="UIParent" enableMouse="true" hidden="true" movable="true" virtual="true" toplevel="true" mouseWheel="true">
+    <Scripts>
+      <OnShow>
+        for i, g in pairs({self:GetChildren()}) do
+          g:Show()
+        end
+        self:RegisterForDrag("LeftButton")
+      </OnShow>
+      <OnDragStart>
+        self:StartMoving()
+      </OnDragStart>
+      <OnDragStop>
+        self:StopMovingOrSizing()
+      </OnDragStop>
+      <OnMouseWheel>
+        self:Wheel(delta)
+      </OnMouseWheel>
+    </Scripts>
+    <Anchors>
+      <Anchor point="CENTER" />
+    </Anchors>
+    <Size x="300" y="200" />
+    <Layers>
+      <Layer level="BACKGROUND">
+        <Texture setAllPoints="true" blendMode="ADD">
+          <Color r="1" b="1" g="1" a="1" />
+          <Gradient orientation="HORIZONTAL">
+            <MinColor r="1" g="0" b="0.5" a="0.5" />
+            <MaxColor r="1" g=".5" b="0" a="0.5" />
+          </Gradient>
+        </Texture>
+        <Texture blendMode="ADD" parentKey="controls">
+          <Anchors>
+            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
+            <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" />
+          </Anchors>
+          <Color r="1" b="1" g="1" a="1" />
+          <Gradient orientation="HORIZONTAL">
+            <MinColor r=".4" g=".4" b="1" a="1" />
+            <MaxColor r="1" g="0" b=".5" a="1" />
+          </Gradient>
+        </Texture>
+      </Layer>
+      <Layer level="BORDER">
+        <Texture blendMode="BLEND">
+          <Color r="0" g="0" b="0" a="1" />
+          <Anchors>
+            <Anchor point="TOPLEFT" />
+            <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" x="0" y="-25" />
+          </Anchors>
+        </Texture>
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString name="$parentTitle" parentKey="name" inherits="TurokFont" justifyV="TOP" justifyH="LEFT" text="Set Title!">
+          <Color r="1" g="1" b="1" a="1" />
+          <Anchors>
+            <Anchor point="TOPLEFT" x="5" y="-5" />
+          </Anchors>
+          <Size x="200" y="40" />
+        </FontString>
+        <FontString name="$parentTitle" parentKey="pagenum" inherits="TurokFont" justifyV="TOP" justifyH="RIGHT">
+          <Color r="1" g="1" b="1" a="1" />
+          <Anchors>
+            <Anchor point="TOPRIGHT" x="-25" y="-5" />
+          </Anchors>
+        </FontString>
+      </Layer>
+    </Layers>
+    <Frames>
+
+      <Button name="$parentButton_Close" inherits="UIPanelCloseButton">
+        <Size x="30" y="30" />
+        <Anchors>
+          <Anchor point="TOPRIGHT" x="3" y="3" />
+        </Anchors>
+      </Button>
+    </Frames>
+  </Frame>
+
+  <!-- LIST FRAME OVERHEAD -->
+  <Frame name="TurokListFrame" inherits="TurokDialogFrame" virtual="true">
+    <Frames>
+      <Button name="$parentButton_Prev" inherits="TurokButton" />
+      <Button name="$parentButton_Add"  inherits="TurokButton" />
+      <Button name="$parentButton_Next"  inherits="TurokButton" />
+    </Frames>
+  </Frame>
+
+  <!-- LIST FRAME ROW -->
+  <Frame name="TurokListItem" parent="UIParent" parentArray="tabs" enableMouse="true" hidden="true" virtual="true">
+    <Scripts>
+      <OnEnter>
+        GameTooltip:SetOwner(self, "ANCHOR_LEFT");
+        if self.spellID then
+          GameTooltip:SetSpellByID(self.spellID);
+        else
+          GameTooltip:SetText(self.desc)
+        end
+        GameTooltip:Show();
+      </OnEnter>
+      <OnLeave function="GameTooltip_Hide"/>
+    </Scripts>
+    <Size x="300" y="30" />
+    <Layers>
+      <Layer level="BACKGROUND">
+        <Texture parentKey="background" name="$parentTab" blendMode="BLEND">
+          <Size x="50" y="21" />
+          <Color r="0" g="0" b="0" a=".3" />
+          <Anchors>
+            <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentTab" />
+          </Anchors>
+        </Texture>
+      </Layer>
+      <Layer level="HIGHLIGHT">
+        <Texture name="$parent_Highlight" parentKey="highlight" selAllPoints="true" blendMode="ADD">
+          <Color r="1" g="1" b="1" a=".25" />
+        </Texture>
+      </Layer>
+
+      <Layer level="OVERLAY">
+      </Layer>
+    </Layers>
+  </Frame>
+
+  <Frame name="TkWidgetScripts" virtual="true">
+    <Scripts>
+      <OnValueChanged>
+        if self.value then
+          self.value:SetText(tostring(math.floor(value)))
+          self.value:SetPoint('LEFT', self:GetThumbTexture(), 'LEFT', 1, 0)
+        end
+      </OnValueChanged>
+    </Scripts>
+  </Frame>
+
+  <Slider name="TkSlider" orientation="HORIZONTAL" enableMouse="true"
+          parentArray="_scroller"
+          minValue="0" maxValue="800" valueStep="4" stepsPerPage="3" defaultValue="400" inherits="TkWidgetScripts" virtual="true">
+    <HitRectInsets left="0" right="0" bottom="0" top="0" />
+    <Anchors><Anchor point="CENTER" /></Anchors>
+    <Size x="350" y="30" />
+    <ThumbTexture parentKey="thumb" name="$parentThumb">
+      <Color r="1" g=".45" b="0" a="1" />
+      <Size x="30" y="30" />
+      <Anchors>
+        <Anchor point="BOTTOM" />
+      </Anchors>
+    </ThumbTexture>
+    <Layers>
+      <Layer level="BACKGROUND">
+        <Texture parentKey="background">
+          <Color r="0" g="0" b="0" a="0.5" />
+          <Anchors>
+            <Anchor point="TOPLEFT" x="0" y="-16" />
+            <Anchor point="BOTTOMRIGHT" x="0" y="0" />
+          </Anchors>
+        </Texture>
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString parentKey="value" inherits="TurokFontDetail" />
+        <FontString parentkey="name" inherits="TurokFont">
+          <Anchors>
+            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
+          </Anchors>
+        </FontString>
+      </Layer>
+      <Layer level="HIGHLIGHT">
+
+        <Texture alphaMode="MOD">
+          <Anchors>
+            <Anchor point="TOPLEFT" x="0" y="-16" />
+            <Anchor point="BOTTOMRIGHT" x="0" y="0" />
+          </Anchors>
+          <Color r="0.5" b="0.5" g="0.5" a="0.25" />
+        </Texture>
+      </Layer>
+    </Layers>
+  </Slider>
+
+
+  <EditBox name="TkEditBox" font="TurokFont" inherits="TkWidgetScripts" virtual="true"
+           historyLines="3"
+           autoFocus="false"
+           parentArray="_inputs">
+    <Backdrop bgFile="Interface\Addons\Turok\Media\border\BG-Solid.blp" edgeFile="Interface\Addons\Turok\Media\border\BigBorder-Solid.blp" tile="true">
+      <EdgeSize val="12"/>
+      <TileSize val="12"/>
+      <BorderColor r="0" g="0" b="0" a="1" />
+      <Color r="1" g="1" b="1" a="1" />
+      <BackgroundInsets>
+        <AbsInset left="3" right="3" top="3" bottom="3"/>
+      </BackgroundInsets>
+    </Backdrop>
+    <Scripts>
+      <OnEscapePressed>
+        self:ClearFocus()
+      </OnEscapePressed>
+      <OnEnterPressed>
+        self:ClearFocus()
+      </OnEnterPressed>
+      <OnEditFocusGained>
+        print(self:GetName(),'gained focus')
+        self.__bg = {self.background:GetTexture()}
+        self.background:SetTexture(0,0,0,1)
+      </OnEditFocusGained>
+      <OnEditFocusLost>
+        print(self:GetName(),'lost focus')
+        self:GetParent():GetParent().EditBox(self)
+        self.background:SetTexture(unpack(self.__bg))
+        self.__bg = nil
+      </OnEditFocusLost>
+    </Scripts>
+    <Size x="350" y="48" />
+    <TextInsets>
+      <AbsInset left="4" top="22" right="4" bottom="0" />
+    </TextInsets>
+    <Layers>
+      <Layer level="BACKGROUND">
+        <Texture parentKey="border" alphaMode="MOD">
+          <Anchors>
+            <Anchor point="BOTTOMLEFT" x="3" y="3" />
+            <Anchor point="TOPRIGHT" x="-3" y="-3" />
+          </Anchors>
+          <Color r="1" g="1" b="1" a="1" />
+          <Gradient orientation="HORIZONTAL">
+            <MinColor r="0.4" g="0" b="0.2" a="1" />
+            <MaxColor r="1" g="0.35" b="0.15" a="1" />
+          </Gradient>
+        </Texture>
+      </Layer>
+      <Layer level="BORDER">
+        <Texture parentKey="background">
+          <Color r="0" g="0" b="0" a="0.5" />
+          <Anchors>
+            <Anchor point="TOPLEFT" x="3" y="-22" />
+            <Anchor point="BOTTOMRIGHT" x="-3" y="3" />
+          </Anchors>
+        </Texture>
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString parentkey="description" inherits="TkDialogFieldFont" justifyV="TOP" justifyH="LEFT">
+          <Anchors>
+            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="5" y="-6" />
+          </Anchors>
+        </FontString>
+      </Layer>
+    </Layers>
+  </EditBox>
+
+
+  <Button name="TurokDDButton" inherits="TurokButton" parent="UIParent" enableMouse="true" virtual="true">
+    <NormalTexture setAllPoints="true">
+      <Color r=".35" g="0" b=".7" a="1" />
+    </NormalTexture>
+  </Button>
+
+  <Frame name="TurokDialogRow" enableMouse="true" hidden="true" movable="true" virtual="true" toplevel="true" mouseWheel="true">
+    <Size x="200" y="42" />
+  </Frame>
+
+  <!-- TIMER EDIT FRAME -->
+  <Frame name="TkTimerConfig" parent="UIParent" hidden="true" inherits="TurokDialogFrame">
+    <Scripts>
+      <OnLoad>
+        self.Wheel = function(self, delta) print(self:GetName(), 'wheel stuff')
+        if self._scroller then
+          for i, region in ipairs(self._scroller) do
+            if region:IsMouseOver() then
+              print(self:GetName(),'hit #', i, region:GetName())
+              region:SetValue(region:GetValue()+delta)
+            end
+          end
+        else
+          print(self:GetName(),'no scrollwheel regions')
+        end
+        end
+
+        print('uhmmm', type(self))
+        LibStub("LibFog-1.0").SetAnimationGroup(self)
+        -- Turok stuff
+      </OnLoad>
+      <OnShow>
+        TkPanel_Init(self)
+        self:RegisterForDrag("LeftButton")
+        self.name:SetText(self.timerName)
+        self.pagenum:SetText(self.timerID)
+        self:SetAlpha(0)
+        self:Fade(0.2, 1)
+      </OnShow>
+    </Scripts>
+    <Size x="400" y="300" />
+    <Anchors>
+      <Anchor point="CENTER" />
+    </Anchors>
+    <Frames>
+
+
+      <Button name="$parentButton_Spells" inherits="TurokButton" />
+      <Button name="$parentButton_Move" inherits="TurokButton" />
+      <Button name="$parentButton_Delete" inherits="TurokButton" />
+    </Frames>
+  </Frame>
+</Ui>
\ No newline at end of file