diff Devian.xml @ 14:5254d1ba6013 v1.2-r15

Multiple output windows can be created for different output prefixes, and prefixes can be designated to an existing or new "console" with /dvn <prefix> <console> Frame objects are generated directly from XML data, and their state information is stored in the object itself to resolve issues with GetWidth() returning old info in some cases. StackFrames and DistributeFrames methods can be invoked from /script to arrange the buffers.
author Nenue
date Sun, 20 Dec 2015 00:46:42 -0500
parents 080dfa4990fb
children 31ca76e04766
line wrap: on
line diff
--- a/Devian.xml	Sat Dec 19 07:59:12 2015 -0500
+++ b/Devian.xml	Sun Dec 20 00:46:42 2015 -0500
@@ -1,4 +1,10 @@
 <Ui>
+
+  <Texture name="DevianBorder" virtual="true" setAllPoints="false">
+    <Color r="1" g="0" b="0" a="1" />
+    <Size x="2" y="2" />
+  </Texture>
+
   <Frame
       name="DevianConsole"
       parent="UIParent"
@@ -10,19 +16,16 @@
       toplevel="true"
       hidden="true"
       virtual="true">
-    <KeyValues>
-      <KeyValue key="index" type="number" value="1" />
-      <KeyValue key="name" value="Devian" />
-      <KeyValue key="format" value="Devian [%s]" />
-    </KeyValues>
     <ResizeBounds>
       <minResize x="200" y="20" />
       <maxResize x="1920" y="1200" />
     </ResizeBounds>
     <Scripts>
+      <OnShow></OnShow>
       <OnMouseDown>
+        self:ToFront()
         if button == 'LeftButton' then
-          if self.grip:IsMouseOver() then
+          if self.out.grip:IsMouseOver() then
             return self:StartSizing()
           end
           return self:StartMoving()
@@ -33,6 +36,10 @@
           return self:MinMax()
         end
         self:StopMovingOrSizing()
+        self.x = nil -- free these up
+        self.y = nil
+        self.width = nil
+        self.height = nil
         self:Save()
       </OnMouseUp>
       <OnMouseWheel>
@@ -56,8 +63,9 @@
         else
           self.throttle = GetTime()
         end
-
-        self.header:SetText(string.format(self.format, GetTime()))
+        local text = string.gsub(self.format, '%%t', GetTime(), 1)
+        text = string.gsub(text, '%%n', self.signature, 1)
+        self.header:SetText(text)
       </OnUpdate>
     </Scripts>
 
@@ -92,6 +100,19 @@
               </Gradient>
             </Texture>
           </Layer>
+          <Layer level="OVERLAY">
+            <Texture name="DevianGripper" 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="1" g="1" b="1" a="1"/>
+              <Gradient orientation="VERTICAL">
+                <MaxColor r="0.2" g="0.2" b="0.2" a="1"/>
+                <MinColor r="0.5" g="0.5" b="0.5" a="1"/>
+              </Gradient>
+            </Texture>
+          </Layer>
         </Layers>
       </ScrollingMessageFrame>
     </Frames>
@@ -122,17 +143,50 @@
           </FontHeight>
         </FontString>
       </Layer>
-      <Layer level="OVERLAY">
-        <Texture parentKey="grip" strata="HIGH" alphaMode="ADD">
+      <Layer level="BORDER">
+        <Texture name="DevBorderUR" parentArray="border" inherits="DevianBorder">
           <Anchors>
-            <Anchor point="BOTTOMRIGHT" x="-1" y="1" />
+            <Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" />
           </Anchors>
-          <Size x="18" y="18" />
-          <Color r="1" g="1" b="1" a="1"/>
-          <Gradient orientation="VERTICAL">
-            <MaxColor r="0.2" g="0.2" b="0.2" a="1"/>
-            <MinColor r="0.5" g="0.5" b="0.5" a="1"/>
-          </Gradient>
+        </Texture>
+        <Texture name="DevBorderU" parentArray="border" inherits="DevianBorder">
+          <Anchors>
+            <Anchor point="TOPLEFT"  y="2" />
+            <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" />
+          </Anchors>
+        </Texture>
+        <Texture name="DevBorderUL" parentArray="border" inherits="DevianBorder">
+          <Anchors>
+            <Anchor point="BOTTOMRIGHT" parentArray="border" relativePoint="TOPLEFT" />
+          </Anchors>
+        </Texture>
+        <Texture name="DevBorderL" parentArray="border" 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" inherits="DevianBorder">
+          <Anchors>
+            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" />
+            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" />
+          </Anchors>
         </Texture>
       </Layer>
     </Layers>