diff Devian.xml @ 35:3304455a3f45

code organizing; UI stuff is in the UI script, Devian prime just deals with config and print corner menu elements placed and hooked, still needs follow-up code
author Nenue
date Sun, 27 Dec 2015 03:51:17 -0500
parents e6650821a2c0
children bec37163b7fe
line wrap: on
line diff
--- a/Devian.xml	Sun Dec 27 02:33:06 2015 -0500
+++ b/Devian.xml	Sun Dec 27 03:51:17 2015 -0500
@@ -3,7 +3,8 @@
   <Script file="Libs\LibStub\LibStub.lua" />
   <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
   <Include file="Libs\AceAddon-3.0\Console-3.0.xml" />
-  <!--@end-no-lib-strip@-->.
+  <!--@end-no-lib-strip@-->
+
 
   <Texture virtual="true" name="DevianBorder" setAllPoints="false">
     <Color r="1" g="0" b="0" a="1" />
@@ -24,6 +25,42 @@
     </Gradient>
   </Texture>
 
+  <Button virtual="true" name="DevianDDButton" parentKey="button" alphaMode="BLEND">
+    <Scripts>
+      <OnClick>
+        ToggleDropDownMenu(1, nil, self:GetParent().menuFrame, self, 0, 0);
+      </OnClick>
+    </Scripts>
+    <Size x="16" y="16" />
+    <Layers>
+      <Layer level="ARTWORK">
+        <Texture file="Interface\Addons\Devian\menu-button.blp" setAllPoints="true" alphaMode="ADD">
+          <Color a="1" r="1" g="1" b="1" />
+        </Texture>
+      </Layer>
+    </Layers>
+  </Button>
+
+
+
+  <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>
+    </Scripts>
+  </Frame>
+
   <ScrollingMessageFrame
       name="DevianBuffer"
       maxLines="500"
@@ -174,12 +211,16 @@
       </Layer>
     </Layers>
     <Frames>
+      <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" />
+      <Button name="$parentMenuButton" parentKey="menuButton" inherits="DevianDDButton" enableMouse="true">
+        <Anchors>
+          <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="0" />
+        </Anchors>
+      </Button>
       <ScrollingMessageFrame parentKey="out" inherits="DevianBuffer" />
     </Frames>
   </Frame>
 
-
-
   <Frame
       name="DevianDockFrame"
       inherits="DevianConsole"