diff Devian.xml @ 36:bec37163b7fe v2.0-beta

rewrote the blocks for '/dvn tag' and SetChannel to be more predictable; currently follows: /dvn tag <source> <dest> if <dest> matches a channel, then the tag for <source> is added or removed if <dest> is a string and it doesn't match a channel, then that channel is created with <dest> as a signature if <dest> is a number that doesn't match a channel index, then <dest> is set to <highest valid index + 1>, the channel is created under that, and <source> is used as its signature SetChannel(cinfo, key) start with an empty table t_info that is filled in as follows: if key doesn't match a valid index/signature, then a channel is being created if key does match a valid index, then a channel is being updated if cinfo is a string, then only the signature value is imposed if cinfo is a table, the values from that table are imposed if a channel is being created, then the new channel info is filled in from primary channel, the index is auto-generated, and the signature value is checked for collision, and the information is passed through CreateConsole to form internal assignments if a channel is being updated, then t_info is populated from the channel data, and any internal table assignments are switched over to t_info the old tables sink into garbage collection
author Nenue
date Sun, 27 Dec 2015 08:19:45 -0500
parents 3304455a3f45
children dcc57a7cabc9
line wrap: on
line diff
--- a/Devian.xml	Sun Dec 27 03:51:17 2015 -0500
+++ b/Devian.xml	Sun Dec 27 08:19:45 2015 -0500
@@ -12,7 +12,7 @@
   </Texture>
 
 
-  <Texture virtual="true" name="DevianHeader" parentKey="titlebar" alphaMode="BLEND">
+  <Texture virtual="true" name="DevianHeader" alphaMode="BLEND">
     <Anchors>
       <Anchor point="TOPLEFT" />
       <Anchor point="TOPRIGHT" />
@@ -25,17 +25,18 @@
     </Gradient>
   </Texture>
 
-  <Button virtual="true" name="DevianDDButton" parentKey="button" alphaMode="BLEND">
+  <Button virtual="true" name="DevianDDButton" alphaMode="BLEND">
     <Scripts>
       <OnClick>
         ToggleDropDownMenu(1, nil, self:GetParent().menuFrame, self, 0, 0);
       </OnClick>
     </Scripts>
-    <Size x="16" y="16" />
+    <Size x="32" y="16" />
     <Layers>
       <Layer level="ARTWORK">
-        <Texture file="Interface\Addons\Devian\menu-button.blp" setAllPoints="true" alphaMode="ADD">
+        <Texture 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>
@@ -46,18 +47,7 @@
   <Frame name="DevianDDMenu" virtual="true" inherits="UIDropDownMenuTemplate" id="1">
     <Scripts>
       <OnLoad>
-        local f = self:GetParent()
-        UIDropDownMenu_Initialize(self, function()
-          local info            = {
-            text       = "Some Text",
-            value      = "OptionVariable",
-            func       = function () print(self:GetParent().signature, 'how') end
-          }
-          -- can also be done as function() FunctionCalledWhenOptionIsClicked() end;
-
-          -- Add the above information to the options menu as a button.
-          UIDropDownMenu_AddButton(info);
-        end, 'MENU')</OnLoad>
+        </OnLoad>
     </Scripts>
   </Frame>
 
@@ -141,12 +131,19 @@
       </OnMouseWheel>
     </Scripts>
     <Layers>
-      <Layer level="ARTWORK">
+      <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="-2" />
+            <Anchor point="TOPLEFT" x="4" y="0" />
           </Anchors>
           <Size y="20" />
           <FontHeight>
@@ -200,23 +197,14 @@
           </Anchors>
         </Texture>
       </Layer>
-      <Layer level="OVERLAY">
-        <Texture name="$parentHeader" parentKey="header" inherits="DevianHeader">
-          <Anchors>
-            <Anchor point="TOPLEFT" />
-            <Anchor point="TOPRIGHT" />
-            <Size y="20" />
-          </Anchors>
-        </Texture>
-      </Layer>
     </Layers>
     <Frames>
-      <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" />
-      <Button name="$parentMenuButton" parentKey="menuButton" inherits="DevianDDButton" enableMouse="true">
+      <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>
   </Frame>