view Devian.xml @ 89:b3ed963f482d v.2.1.92

- /dvc command needed a pre-defined enclosure to properly work through SlashCmdList - /dvn <profile name> and /dvn save <profile name> should resolve to and update the correct profile. - set some globals indicating the name and index of the workspace in use - DEVIAN_WORKSPACE (bool) - DEVIAN_PNAME (string) - DEVIAN_PID (number)
author Nenue
date Wed, 10 Aug 2016 06:58:27 -0400
parents e89244da507b
children f6fae1a4c66c
line wrap: on
line source
<Ui>
  <!--@no-lib-strip@-->
  <Script file="Libs\LibStub\LibStub.lua" />
  <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
  <Include file="Libs\AceConsole-3.0\Console-3.0.xml" />
  <!--@end-no-lib-strip@-->


  <Texture virtual="true" name="DevianBorder" setAllPoints="false">
    <Color r="1" g="0" b="0" a="1" />
    <Size x="2" y="2" />
  </Texture>


  <Texture virtual="true" name="DevianHeader" alphaMode="BLEND">
    <Anchors>
      <Anchor point="TOPLEFT" />
      <Anchor point="TOPRIGHT" />
    </Anchors>
    <Size y="20" />
    <Color r="0.3" g="0.3" b="0.3" a="1" />
    <Gradient orientation="VERTICAL">
      <MinColor r="0" g="0" b="0" a="0.7"/>
      <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/>
    </Gradient>
  </Texture>


  <Button virtual="true" name="DevianButton" alphaMode="BLEND">
    <Size x="32" y="16" />
    <Layers>
      <Layer level="ARTWORK">
        <Texture name="$parentIcon" parentKey="icon" file="Interface\Addons\Devian\menu-button.blp" setAllPoints="true" alphaMode="ADD">
          <Color a="1" r="1" g="1" b="1" />
          <TexCoords top="0.47" left="0" bottom="0.9" right="1" />
        </Texture>
      </Layer>
    </Layers>
  </Button>

  <Button virtual="true" name="DevianDDButton" inherits="DevianButton" alphaMode="BLEND">
    <Scripts>
      <OnClick>
        ToggleDropDownMenu(1, nil, self:GetParent().menuFrame, self, 0, 0);
      </OnClick>
    </Scripts>
  </Button>

  <Font name="DevianText" font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" outline="NORMAL" virtual="true">
    <FontHeight>
      <AbsValue val="13" />
    </FontHeight>
    <Color r="1" g="1" b="1" a="1" />
  </Font>

  <Frame name="DevianDDMenu" virtual="true" inherits="UIDropDownMenuTemplate" id="1">
    <Scripts>
      <OnLoad>
        </OnLoad>
    </Scripts>
  </Frame>

  <ScrollingMessageFrame
      name="DevianBuffer"
      maxLines="500"
      fade="false"
      displayduration="2147483647"
      insertMode="BOTTOM"
      virtual="true">
    <Anchors>
      <Anchor point="TOPLEFT" y="-20" />
      <Anchor point="BOTTOMRIGHT" />
    </Anchors>
    <FontString inherits="DevianFont" wordwrap="true"
                 justifyH="LEFT"
                 indented="true"
                 setAllPoints="true"
                  parentArray="_msg">
      <FontHeight>
        <AbsValue val="13"/>
      </FontHeight>
    </FontString>

    <Layers>
      <Layer level="ARTWORK">
        <Texture name="$parentBackdrop" parentKey="backdrop" setAllPoints="true" alphaMode="BLEND">
          <Color r="1" g="1" b="1" a="1"/>
          <Gradient orientation="VERTICAL">
            <MinColor r="0" g="0" b="0" a="0.7"/>
            <MaxColor r="0" g="0" b="0" a="0.3"/>
          </Gradient>
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <Texture name="DevianGripperRight" file="Interface\Addons\Devian\corner.blp" parentKey="grip" strata="HIGH" alphaMode="ADD">
          <Anchors>
            <Anchor point="BOTTOMRIGHT" x="-1" y="1" />
          </Anchors>
          <Size x="18" y="18" />
          <Color r="0.4" g="0.4" b="0.4" a="1"/>
          <Gradient orientation="VERTICAL">
            <MaxColor r="0.9" g="0.9" b="0.9" a="1"/>
            <MinColor r="0.4" g="0.4" b="0.4" a="1"/>
          </Gradient>
        </Texture>
      </Layer>
    </Layers>
  </ScrollingMessageFrame>

  <Frame
      name="DevianConsole"
      parent="UIParent"
      enableMouse="true"
      enableMouseWheel="true"
      clampedToScreen="true"
      movable="true"
      resizable="true"
      toplevel="true"
      hidden="true"
      virtual="true">
    <ResizeBounds>
      <minResize x="200" y="20" />
      <maxResize x="1920" y="1200" />
    </ResizeBounds>
    <Scripts>
      <OnShow>
        self.title:SetText(self.index..' '.. self.signature)
      </OnShow>
      <OnMouseWheel>
        local up =  delta > 0
        if IsControlKeyDown() then
          if up then self.out:ScrollToTop()
          else self.out:ScrollToBottom() end
        elseif IsShiftKeyDown() then
          if up then self.out:PageUp()
          else self.out:PageDown() end
        else
          if up then self.out:ScrollUp()
          else self.out:ScrollDown() end
        end
      </OnMouseWheel>
    </Scripts>
    <Layers>
      <Layer level="OVERLAY">
        <Texture parentKey="header" inherits="DevianHeader">
          <Anchors>
            <Anchor point="TOPLEFT" />
            <Anchor point="TOPRIGHT" />
            <Size y="20" />
          </Anchors>
        </Texture>
        <FontString parentKey="title" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true"
                    justifyH="LEFT"
                    indented="true">
          <Anchors>
            <Anchor point="TOPLEFT" x="4" y="0" />
          </Anchors>
          <Size y="20" />
          <FontHeight>
            <AbsValue val="12"/>
          </FontHeight>
        </FontString>
      </Layer>
      <Layer level="BORDER">
        <Texture name="DevBorderUR" parentArray="border" parentkey="topright" inherits="DevianBorder">
          <Anchors>
            <Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" />
          </Anchors>
        </Texture>
        <Texture name="DevBorderU" parentArray="border" parentKey="top" inherits="DevianBorder">
          <Anchors>
            <Anchor point="TOPLEFT"  y="2" />
            <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" />
          </Anchors>
        </Texture>
        <Texture name="DevBorderUL" parentArray="border" parentKey="topleft" inherits="DevianBorder">
          <Anchors>
            <Anchor point="BOTTOMRIGHT" parentArray="border" relativePoint="TOPLEFT" />
          </Anchors>
        </Texture>
        <Texture name="DevBorderL" parentArray="border" parentKey="left" inherits="DevianBorder">
          <Anchors>
            <Anchor point="TOPLEFT"  x="-2" />
            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" />
          </Anchors>
        </Texture>
        <Texture name="DevBorderBL" parentArray="border" inherits="DevianBorder">
          <Anchors>
            <Anchor point="TOPRIGHT" relativePoint="BOTTOMLEFT" />
          </Anchors>
        </Texture>
        <Texture name="DevBorderB" parentArray="border" inherits="DevianBorder">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" y="-2" />
          </Anchors>
        </Texture>
        <Texture name="DevBorderBR" parentArray="border" inherits="DevianBorder">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT" />
          </Anchors>
        </Texture>
        <Texture name="DevBorderR" parentArray="border" parentKey="right" inherits="DevianBorder">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" />
            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" />
          </Anchors>
        </Texture>
      </Layer>
    </Layers>
    <Frames>
      <Button name="$parentMenuButton"  parentKey="dropmenu" inherits="DevianDDButton" enableMouse="true">
        <Anchors>
          <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="0" />
        </Anchors>
      </Button>
      <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" />
      <ScrollingMessageFrame parentKey="out" inherits="DevianBuffer" />
    </Frames>
    <Animations>
      <AnimationGroup name="moveFade" parentKey="moveFade" setToFinalAlpha="true" ignoreFramerateThrottle="true">
        <Alpha parentKey="alphaOut" duration="0.5" order="1" />
        <Translation parentKey="translateOut" duration="0.5" order="1" />
      </AnimationGroup>
    </Animations>
  </Frame>

  <Frame
      name="DevianDock"
      parent="UIParent"
      enableMouse="true"
      alpha="0.1"
      hidden="true"
      frameStrata="LOW">
    <Scripts>
      <OnEnter>
        Devian.DockHighlight(self)
      </OnEnter>
      <OnLeave>
        Devian.DockHighlight(self)
      </OnLeave>
    </Scripts>
    <Anchors>
      <Anchor point="TOP" relativePoint="TOP" x="0" y="1" />
    </Anchors>
    <Size x="32" y="20" />
    <Layers>
      <Layer level="ARTWORK">
        <Texture name="$parentBar" parent="DevianDock" setAllPoints="true" parentKey="caption" alphaMode="BLEND">
          <Color r="1" g="1" b="1" a="1" />
          <Gradient orientation="VERTICAL">
            <MaxColor r="0.15" g=".15" b="0.15" a="0.4" />
            <MinColor r="0" g="0" b="0" a="0" />
          </Gradient>
        </Texture>

      </Layer>
      <Layer level="OVERLAY">

      </Layer>
    </Layers>
  </Frame>
  <Button name="DevianExecButton" parent="UIParent" hidden="true">
    <Size x="32" y="32" />
    <Anchors>
      <Anchor point="TOPRIGHT" relativePoint="TOPLEFT" relativeTo="DevianDock" x="-4"/>
    </Anchors>

    <NormalTexture file="Interface/Addons/Devian/arrow.blp" setAllPoints="true" alphaMode="ADD">
      <Color r="1" g="1" b="1" a="1" />
    </NormalTexture>
    <PushedTexture file="Interface/Addons/Devian/arrow.blp" setAllPoints="true" alphaMode="ADD">
      <Anchors>
        <Anchor point="TOPRIGHT" x="-1" y="-1" />
        <Anchor point="BOTTOMLEFT" x="1" y="1" />
      </Anchors>
      <Color r="1" g="0" b="0.5" a="1" />
    </PushedTexture>



    <Layers>
      <Layer level="ARTWORK">

      </Layer>
    </Layers>
  </Button>

  <Button name="DevianBeacon" hidden="true" inherits="DevianButton" virtual="true" enableMouse="true" alpha="1" frameStrata="MEDIUM">
    <Size x="64" y="32" />

    <Scripts>
      <OnShow>
        Devian.UpdateBeacon(self)
      </OnShow>
      <OnMouseDown>
        --print("click", self:GetName(), button, self.console.index)
        if button == "LeftButton" then
          if IsShiftKeyDown() then
            Devian:Console_Toggle(self.console.index, 0)
          else
            if self.console.index == Devian.currentProfile.current_channel or (not self.console.enabled) then
              Devian:Console_Toggle(self.console.index)
              if self.console.enabled then
                if self.console.minimized then
                  self.console:MinMax()
                end
                self.console:ToFront()
              end
            else
              self.console:ToFront()
            end
          end
        elseif button == "RightButton" then
          self.console:MinMax()
        end
        self.console:Save()
      </OnMouseDown>
      <OnEnter>
        --print(self:GetName(),'got mouse')
        Devian.DockHighlight(self)
      </OnEnter>
    </Scripts>
    <Layers>
      <Layer level="OVERLAY">
      </Layer>
    </Layers>
    <Frames>
      <Frame name="$parentText" parentKey="caption" alpha="0" blendMode="BLEND" enableMouse="false">
        <Size x="100" y="30" />
        <Anchors>
          <Anchor point="BOTTOM" relativePoint="BOTTOM" x="0" y="0" />
        </Anchors>
        <Layers>
          <Layer level="OVERLAY">
            <FontString text="Test String" inherits="DevianText" parentKey="name" setAllPoints="true">
              <Color r="1" g="1" b="1" a="1" />
              <Shadow>
                <Color r="0" g="0" b="0" a="1" />
                <Offset x="0" y="-2" />
              </Shadow>
              <Animations>
                <AnimationGroup>
                  <Scale scaleX="1.4" scaleY="1.4" looping="NONE">
                    <Origin point="CENTER" x="0" y="0" />

                  </Scale>
                </AnimationGroup>
              </Animations>
            </FontString>
          </Layer>
        </Layers>
      </Frame>
    </Frames>
  </Button>

</Ui>