annotate 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
rev   line source
Nenue@4 1 <Ui>
Nenue@32 2 <!--@no-lib-strip@-->
Nenue@32 3 <Script file="Libs\LibStub\LibStub.lua" />
Nenue@32 4 <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
Nenue@32 5 <Include file="Libs\AceAddon-3.0\Console-3.0.xml" />
Nenue@35 6 <!--@end-no-lib-strip@-->
Nenue@35 7
Nenue@14 8
Nenue@33 9 <Texture virtual="true" name="DevianBorder" setAllPoints="false">
Nenue@14 10 <Color r="1" g="0" b="0" a="1" />
Nenue@14 11 <Size x="2" y="2" />
Nenue@14 12 </Texture>
Nenue@14 13
Nenue@33 14
Nenue@33 15 <Texture virtual="true" name="DevianHeader" parentKey="titlebar" alphaMode="BLEND">
Nenue@33 16 <Anchors>
Nenue@33 17 <Anchor point="TOPLEFT" />
Nenue@33 18 <Anchor point="TOPRIGHT" />
Nenue@33 19 </Anchors>
Nenue@33 20 <Size y="20" />
Nenue@33 21 <Color r="0.3" g="0.3" b="0.3" a="1" />
Nenue@33 22 <Gradient orientation="VERTICAL">
Nenue@33 23 <MinColor r="0" g="0" b="0" a="0.7"/>
Nenue@33 24 <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/>
Nenue@33 25 </Gradient>
Nenue@33 26 </Texture>
Nenue@33 27
Nenue@35 28 <Button virtual="true" name="DevianDDButton" parentKey="button" alphaMode="BLEND">
Nenue@35 29 <Scripts>
Nenue@35 30 <OnClick>
Nenue@35 31 ToggleDropDownMenu(1, nil, self:GetParent().menuFrame, self, 0, 0);
Nenue@35 32 </OnClick>
Nenue@35 33 </Scripts>
Nenue@35 34 <Size x="16" y="16" />
Nenue@35 35 <Layers>
Nenue@35 36 <Layer level="ARTWORK">
Nenue@35 37 <Texture file="Interface\Addons\Devian\menu-button.blp" setAllPoints="true" alphaMode="ADD">
Nenue@35 38 <Color a="1" r="1" g="1" b="1" />
Nenue@35 39 </Texture>
Nenue@35 40 </Layer>
Nenue@35 41 </Layers>
Nenue@35 42 </Button>
Nenue@35 43
Nenue@35 44
Nenue@35 45
Nenue@35 46 <Frame name="DevianDDMenu" virtual="true" inherits="UIDropDownMenuTemplate" id="1">
Nenue@35 47 <Scripts>
Nenue@35 48 <OnLoad>
Nenue@35 49 local f = self:GetParent()
Nenue@35 50 UIDropDownMenu_Initialize(self, function()
Nenue@35 51 local info = {
Nenue@35 52 text = "Some Text",
Nenue@35 53 value = "OptionVariable",
Nenue@35 54 func = function () print(self:GetParent().signature, 'how') end
Nenue@35 55 }
Nenue@35 56 -- can also be done as function() FunctionCalledWhenOptionIsClicked() end;
Nenue@35 57
Nenue@35 58 -- Add the above information to the options menu as a button.
Nenue@35 59 UIDropDownMenu_AddButton(info);
Nenue@35 60 end, 'MENU')</OnLoad>
Nenue@35 61 </Scripts>
Nenue@35 62 </Frame>
Nenue@35 63
Nenue@33 64 <ScrollingMessageFrame
Nenue@33 65 name="DevianBuffer"
Nenue@33 66 maxLines="500"
Nenue@33 67 fade="false"
Nenue@33 68 displayduration="2147483647"
Nenue@33 69 insertMode="BOTTOM"
Nenue@33 70 virtual="true">
Nenue@33 71 <Anchors>
Nenue@33 72 <Anchor point="TOPLEFT" y="-20" />
Nenue@33 73 <Anchor point="BOTTOMRIGHT" />
Nenue@33 74 </Anchors>
Nenue@33 75 <FontString font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" wordwrap="true"
Nenue@33 76 justifyH="LEFT"
Nenue@33 77 indented="true"
Nenue@33 78 setAllPoints="true">
Nenue@33 79 <FontHeight>
Nenue@33 80 <AbsValue val="13"/>
Nenue@33 81 </FontHeight>
Nenue@33 82 </FontString>
Nenue@33 83
Nenue@33 84 <Layers>
Nenue@33 85 <Layer level="BACKGROUND">
Nenue@33 86 <Texture name="$parentBackdrop" parentKey="backdrop" setAllPoints="true" alphaMode="BLEND">
Nenue@33 87 <Color r="1" g="1" b="1" a="1"/>
Nenue@33 88 <Gradient orientation="VERTICAL">
Nenue@33 89 <MinColor r="0" g="0" b="0" a="0.7"/>
Nenue@33 90 <MaxColor r="0" g="0" b="0" a="0.3"/>
Nenue@33 91 </Gradient>
Nenue@33 92 </Texture>
Nenue@33 93 </Layer>
Nenue@33 94 <Layer level="OVERLAY">
Nenue@33 95 <Texture name="DevianGripperRight" file="Interface\Addons\Devian\corner.blp" parentKey="grip" strata="HIGH" alphaMode="ADD">
Nenue@33 96 <Anchors>
Nenue@33 97 <Anchor point="BOTTOMRIGHT" x="-1" y="1" />
Nenue@33 98 </Anchors>
Nenue@33 99 <Size x="18" y="18" />
Nenue@33 100 <Color r="0.4" g="0.4" b="0.4" a="1"/>
Nenue@33 101 <Gradient orientation="VERTICAL">
Nenue@33 102 <MaxColor r="0.9" g="0.9" b="0.9" a="1"/>
Nenue@33 103 <MinColor r="0.4" g="0.4" b="0.4" a="1"/>
Nenue@33 104 </Gradient>
Nenue@33 105 </Texture>
Nenue@33 106 </Layer>
Nenue@33 107 </Layers>
Nenue@33 108 </ScrollingMessageFrame>
Nenue@33 109
Nenue@13 110 <Frame
Nenue@13 111 name="DevianConsole"
Nenue@13 112 parent="UIParent"
Nenue@13 113 enableMouse="true"
Nenue@13 114 enableMouseWheel="true"
Nenue@13 115 clampedToScreen="true"
Nenue@13 116 movable="true"
Nenue@13 117 resizable="true"
Nenue@13 118 toplevel="true"
Nenue@13 119 hidden="true"
Nenue@13 120 virtual="true">
Nenue@5 121 <ResizeBounds>
Nenue@5 122 <minResize x="200" y="20" />
Nenue@5 123 <maxResize x="1920" y="1200" />
Nenue@5 124 </ResizeBounds>
Nenue@4 125 <Scripts>
Nenue@32 126 <OnShow>
Nenue@33 127 self.title:SetText(self.index..' '.. self.signature)
Nenue@32 128 </OnShow>
Nenue@4 129 <OnMouseWheel>
Nenue@4 130 local up = delta > 0
Nenue@4 131 if IsControlKeyDown() then
Nenue@13 132 if up then self.out:ScrollToTop()
Nenue@13 133 else self.out:ScrollToBottom() end
Nenue@4 134 elseif IsShiftKeyDown() then
Nenue@13 135 if up then self.out:PageUp()
Nenue@13 136 else self.out:PageDown() end
Nenue@4 137 else
Nenue@13 138 if up then self.out:ScrollUp()
Nenue@13 139 else self.out:ScrollDown() end
Nenue@4 140 end
Nenue@4 141 </OnMouseWheel>
Nenue@4 142 </Scripts>
Nenue@4 143 <Layers>
Nenue@32 144 <Layer level="ARTWORK">
Nenue@33 145 <FontString parentKey="title" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true"
Nenue@4 146 justifyH="LEFT"
Nenue@4 147 indented="true">
Nenue@4 148 <Anchors>
Nenue@4 149 <Anchor point="TOPLEFT" x="4" y="-2" />
Nenue@4 150 </Anchors>
Nenue@4 151 <Size y="20" />
Nenue@4 152 <FontHeight>
Nenue@4 153 <AbsValue val="12"/>
Nenue@4 154 </FontHeight>
Nenue@4 155 </FontString>
Nenue@4 156 </Layer>
Nenue@14 157 <Layer level="BORDER">
Nenue@32 158 <Texture name="DevBorderUR" parentArray="border" parentkey="topright" inherits="DevianBorder">
Nenue@4 159 <Anchors>
Nenue@14 160 <Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" />
Nenue@4 161 </Anchors>
Nenue@14 162 </Texture>
Nenue@32 163 <Texture name="DevBorderU" parentArray="border" parentKey="top" inherits="DevianBorder">
Nenue@14 164 <Anchors>
Nenue@14 165 <Anchor point="TOPLEFT" y="2" />
Nenue@14 166 <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" />
Nenue@14 167 </Anchors>
Nenue@14 168 </Texture>
Nenue@32 169 <Texture name="DevBorderUL" parentArray="border" parentKey="topleft" inherits="DevianBorder">
Nenue@14 170 <Anchors>
Nenue@14 171 <Anchor point="BOTTOMRIGHT" parentArray="border" relativePoint="TOPLEFT" />
Nenue@14 172 </Anchors>
Nenue@14 173 </Texture>
Nenue@32 174 <Texture name="DevBorderL" parentArray="border" parentKey="left" inherits="DevianBorder">
Nenue@14 175 <Anchors>
Nenue@14 176 <Anchor point="TOPLEFT" x="-2" />
Nenue@14 177 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" />
Nenue@14 178 </Anchors>
Nenue@14 179 </Texture>
Nenue@14 180 <Texture name="DevBorderBL" parentArray="border" inherits="DevianBorder">
Nenue@14 181 <Anchors>
Nenue@14 182 <Anchor point="TOPRIGHT" relativePoint="BOTTOMLEFT" />
Nenue@14 183 </Anchors>
Nenue@14 184 </Texture>
Nenue@14 185 <Texture name="DevBorderB" parentArray="border" inherits="DevianBorder">
Nenue@14 186 <Anchors>
Nenue@14 187 <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
Nenue@14 188 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" y="-2" />
Nenue@14 189 </Anchors>
Nenue@14 190 </Texture>
Nenue@14 191 <Texture name="DevBorderBR" parentArray="border" inherits="DevianBorder">
Nenue@14 192 <Anchors>
Nenue@14 193 <Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT" />
Nenue@14 194 </Anchors>
Nenue@14 195 </Texture>
Nenue@32 196 <Texture name="DevBorderR" parentArray="border" parentKey="right" inherits="DevianBorder">
Nenue@14 197 <Anchors>
Nenue@14 198 <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" />
Nenue@14 199 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" />
Nenue@14 200 </Anchors>
Nenue@4 201 </Texture>
Nenue@4 202 </Layer>
Nenue@33 203 <Layer level="OVERLAY">
Nenue@33 204 <Texture name="$parentHeader" parentKey="header" inherits="DevianHeader">
Nenue@33 205 <Anchors>
Nenue@33 206 <Anchor point="TOPLEFT" />
Nenue@33 207 <Anchor point="TOPRIGHT" />
Nenue@33 208 <Size y="20" />
Nenue@33 209 </Anchors>
Nenue@33 210 </Texture>
Nenue@33 211 </Layer>
Nenue@4 212 </Layers>
Nenue@33 213 <Frames>
Nenue@35 214 <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" />
Nenue@35 215 <Button name="$parentMenuButton" parentKey="menuButton" inherits="DevianDDButton" enableMouse="true">
Nenue@35 216 <Anchors>
Nenue@35 217 <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="0" />
Nenue@35 218 </Anchors>
Nenue@35 219 </Button>
Nenue@33 220 <ScrollingMessageFrame parentKey="out" inherits="DevianBuffer" />
Nenue@33 221 </Frames>
Nenue@33 222 </Frame>
Nenue@33 223
Nenue@33 224 <Frame
Nenue@33 225 name="DevianDockFrame"
Nenue@33 226 inherits="DevianConsole"
Nenue@33 227 virtual="true">
Nenue@33 228 <Layers>
Nenue@33 229 <Layer level="ARTWORK">
Nenue@33 230 <Texture name="$parentHeader" parentKey="headerbar" inherits="DevianHeader">
Nenue@33 231 <Anchors>
Nenue@33 232 <Anchor point="TOPLEFT" />
Nenue@33 233 <Size x="150" y="20" />
Nenue@33 234 </Anchors>
Nenue@33 235 </Texture>
Nenue@33 236 <!-- channel headers are moved here -->
Nenue@33 237 </Layer>
Nenue@33 238 </Layers>
Nenue@33 239 <Frames>
Nenue@33 240 <!-- channel scrollers are moved in here -->
Nenue@33 241 </Frames>
Nenue@4 242 </Frame>
Nenue@4 243 </Ui>