annotate Devian.xml @ 58:0a9a6740ea5d v2.1

- Discarded use of blizzard functions never meant for the wild (http://forums.wowace.com/showthread.php?t=20397) - Fixed dock buttons not highlighting properly - Fixed dock buttons not dropping after selection change - Mouse input is disabled during player movement
author Nenue
date Tue, 12 Jan 2016 04:50:37 -0500
parents 1b8c597dba44
children 59e047d6c5de
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@36 15 <Texture virtual="true" name="DevianHeader" 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@47 28
Nenue@47 29 <Button virtual="true" name="DevianButton" alphaMode="BLEND">
Nenue@36 30 <Size x="32" y="16" />
Nenue@35 31 <Layers>
Nenue@35 32 <Layer level="ARTWORK">
Nenue@47 33 <Texture name="$parentIcon" parentKey="icon" file="Interface\Addons\Devian\menu-button.blp" setAllPoints="true" alphaMode="ADD">
Nenue@35 34 <Color a="1" r="1" g="1" b="1" />
Nenue@36 35 <TexCoords top="0.47" left="0" bottom="0.9" right="1" />
Nenue@35 36 </Texture>
Nenue@35 37 </Layer>
Nenue@35 38 </Layers>
Nenue@35 39 </Button>
Nenue@35 40
Nenue@47 41 <Button virtual="true" name="DevianDDButton" inherits="DevianButton" alphaMode="BLEND">
Nenue@47 42 <Scripts>
Nenue@47 43 <OnClick>
Nenue@47 44 ToggleDropDownMenu(1, nil, self:GetParent().menuFrame, self, 0, 0);
Nenue@47 45 </OnClick>
Nenue@47 46 </Scripts>
Nenue@47 47 </Button>
Nenue@35 48
Nenue@47 49 <Font name="DevianText" font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" outline="NORMAL" virtual="true">
Nenue@47 50 <FontHeight>
Nenue@47 51 <AbsValue val="13" />
Nenue@47 52 </FontHeight>
Nenue@47 53 <Color r="1" g="1" b="1" a="1" />
Nenue@47 54 </Font>
Nenue@35 55
Nenue@35 56 <Frame name="DevianDDMenu" virtual="true" inherits="UIDropDownMenuTemplate" id="1">
Nenue@35 57 <Scripts>
Nenue@35 58 <OnLoad>
Nenue@36 59 </OnLoad>
Nenue@35 60 </Scripts>
Nenue@35 61 </Frame>
Nenue@35 62
Nenue@33 63 <ScrollingMessageFrame
Nenue@33 64 name="DevianBuffer"
Nenue@33 65 maxLines="500"
Nenue@33 66 fade="false"
Nenue@33 67 displayduration="2147483647"
Nenue@33 68 insertMode="BOTTOM"
Nenue@33 69 virtual="true">
Nenue@33 70 <Anchors>
Nenue@33 71 <Anchor point="TOPLEFT" y="-20" />
Nenue@33 72 <Anchor point="BOTTOMRIGHT" />
Nenue@33 73 </Anchors>
Nenue@47 74 <FontString inherits="DevianFont" wordwrap="true"
Nenue@33 75 justifyH="LEFT"
Nenue@33 76 indented="true"
Nenue@58 77 setAllPoints="true"
Nenue@58 78 parentArray="_msg">
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@55 85 <Layer level="ARTWORK">
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@36 144 <Layer level="OVERLAY">
Nenue@36 145 <Texture parentKey="header" inherits="DevianHeader">
Nenue@36 146 <Anchors>
Nenue@36 147 <Anchor point="TOPLEFT" />
Nenue@36 148 <Anchor point="TOPRIGHT" />
Nenue@36 149 <Size y="20" />
Nenue@36 150 </Anchors>
Nenue@36 151 </Texture>
Nenue@33 152 <FontString parentKey="title" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true"
Nenue@4 153 justifyH="LEFT"
Nenue@4 154 indented="true">
Nenue@4 155 <Anchors>
Nenue@36 156 <Anchor point="TOPLEFT" x="4" y="0" />
Nenue@4 157 </Anchors>
Nenue@4 158 <Size y="20" />
Nenue@4 159 <FontHeight>
Nenue@4 160 <AbsValue val="12"/>
Nenue@4 161 </FontHeight>
Nenue@4 162 </FontString>
Nenue@4 163 </Layer>
Nenue@14 164 <Layer level="BORDER">
Nenue@32 165 <Texture name="DevBorderUR" parentArray="border" parentkey="topright" inherits="DevianBorder">
Nenue@4 166 <Anchors>
Nenue@14 167 <Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" />
Nenue@4 168 </Anchors>
Nenue@14 169 </Texture>
Nenue@32 170 <Texture name="DevBorderU" parentArray="border" parentKey="top" inherits="DevianBorder">
Nenue@14 171 <Anchors>
Nenue@14 172 <Anchor point="TOPLEFT" y="2" />
Nenue@14 173 <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" />
Nenue@14 174 </Anchors>
Nenue@14 175 </Texture>
Nenue@32 176 <Texture name="DevBorderUL" parentArray="border" parentKey="topleft" inherits="DevianBorder">
Nenue@14 177 <Anchors>
Nenue@14 178 <Anchor point="BOTTOMRIGHT" parentArray="border" relativePoint="TOPLEFT" />
Nenue@14 179 </Anchors>
Nenue@14 180 </Texture>
Nenue@32 181 <Texture name="DevBorderL" parentArray="border" parentKey="left" inherits="DevianBorder">
Nenue@14 182 <Anchors>
Nenue@14 183 <Anchor point="TOPLEFT" x="-2" />
Nenue@14 184 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" />
Nenue@14 185 </Anchors>
Nenue@14 186 </Texture>
Nenue@14 187 <Texture name="DevBorderBL" parentArray="border" inherits="DevianBorder">
Nenue@14 188 <Anchors>
Nenue@14 189 <Anchor point="TOPRIGHT" relativePoint="BOTTOMLEFT" />
Nenue@14 190 </Anchors>
Nenue@14 191 </Texture>
Nenue@14 192 <Texture name="DevBorderB" parentArray="border" inherits="DevianBorder">
Nenue@14 193 <Anchors>
Nenue@14 194 <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
Nenue@14 195 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" y="-2" />
Nenue@14 196 </Anchors>
Nenue@14 197 </Texture>
Nenue@14 198 <Texture name="DevBorderBR" parentArray="border" inherits="DevianBorder">
Nenue@14 199 <Anchors>
Nenue@14 200 <Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT" />
Nenue@14 201 </Anchors>
Nenue@14 202 </Texture>
Nenue@32 203 <Texture name="DevBorderR" parentArray="border" parentKey="right" inherits="DevianBorder">
Nenue@14 204 <Anchors>
Nenue@14 205 <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" />
Nenue@14 206 <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" />
Nenue@14 207 </Anchors>
Nenue@4 208 </Texture>
Nenue@4 209 </Layer>
Nenue@4 210 </Layers>
Nenue@33 211 <Frames>
Nenue@36 212 <Button name="$parentMenuButton" parentKey="dropmenu" inherits="DevianDDButton" enableMouse="true">
Nenue@35 213 <Anchors>
Nenue@35 214 <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="0" />
Nenue@35 215 </Anchors>
Nenue@35 216 </Button>
Nenue@36 217 <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" />
Nenue@33 218 <ScrollingMessageFrame parentKey="out" inherits="DevianBuffer" />
Nenue@33 219 </Frames>
Nenue@33 220 </Frame>
Nenue@33 221
Nenue@33 222 <Frame
Nenue@46 223 name="DevianDock"
Nenue@47 224 parent="UIParent"
Nenue@47 225 enableMouse="true"
Nenue@47 226 alpha="0.1"
Nenue@47 227 hidden="true"
Nenue@47 228 frameStrata="LOW">
Nenue@47 229 <Scripts>
Nenue@47 230 <OnEnter>
Nenue@47 231 Devian.DockHighlight(self)
Nenue@47 232 </OnEnter>
Nenue@47 233 <OnLeave>
Nenue@47 234 Devian.DockHighlight(self)
Nenue@47 235 </OnLeave>
Nenue@47 236 </Scripts>
Nenue@46 237 <Anchors>
Nenue@47 238 <Anchor point="TOP" relativePoint="TOP" x="0" y="1" />
Nenue@46 239 </Anchors>
Nenue@47 240 <Size x="32" y="20" />
Nenue@33 241 <Layers>
Nenue@33 242 <Layer level="ARTWORK">
Nenue@50 243 <Texture name="$parentBar" parent="DevianDock" setAllPoints="true" parentKey="caption" alphaMode="BLEND">
Nenue@46 244 <Color r="1" g="1" b="1" a="1" />
Nenue@46 245 <Gradient orientation="VERTICAL">
Nenue@50 246 <MaxColor r="0.15" g=".15" b="0.15" a="0.4" />
Nenue@47 247 <MinColor r="0" g="0" b="0" a="0" />
Nenue@46 248 </Gradient>
Nenue@33 249 </Texture>
Nenue@46 250
Nenue@46 251 </Layer>
Nenue@46 252 <Layer level="OVERLAY">
Nenue@46 253
Nenue@33 254 </Layer>
Nenue@33 255 </Layers>
Nenue@4 256 </Frame>
Nenue@55 257 <Button name="DevianExecButton" parent="UIParent" hidden="true">
Nenue@55 258 <Size x="32" y="32" />
Nenue@55 259 <Anchors>
Nenue@55 260 <Anchor point="TOPRIGHT" relativePoint="TOPLEFT" relativeTo="DevianDock" x="-4"/>
Nenue@55 261 </Anchors>
Nenue@55 262
Nenue@55 263 <NormalTexture file="Interface/Addons/Devian/arrow.blp" setAllPoints="true" alphaMode="ADD">
Nenue@55 264 <Color r="1" g="1" b="1" a="1" />
Nenue@55 265 </NormalTexture>
Nenue@55 266 <PushedTexture file="Interface/Addons/Devian/arrow.blp" setAllPoints="true" alphaMode="ADD">
Nenue@55 267 <Anchors>
Nenue@55 268 <Anchor point="TOPRIGHT" x="-1" y="-1" />
Nenue@55 269 <Anchor point="BOTTOMLEFT" x="1" y="1" />
Nenue@55 270 </Anchors>
Nenue@55 271 <Color r="1" g="0" b="0.5" a="1" />
Nenue@55 272 </PushedTexture>
Nenue@55 273
Nenue@55 274
Nenue@55 275
Nenue@55 276 <Layers>
Nenue@55 277 <Layer level="ARTWORK">
Nenue@55 278
Nenue@55 279 </Layer>
Nenue@55 280 </Layers>
Nenue@55 281 </Button>
Nenue@47 282
Nenue@47 283 <Button name="DevianBeacon" hidden="true" inherits="DevianButton" virtual="true" enableMouse="true" alpha="1" frameStrata="MEDIUM">
Nenue@47 284 <Size x="64" y="32" />
Nenue@47 285
Nenue@47 286 <Scripts>
Nenue@47 287 <OnShow>
Nenue@50 288 Devian.UpdateBeacon(self)
Nenue@47 289 </OnShow>
Nenue@47 290 <OnMouseDown>
Nenue@47 291 --print("click", self:GetName(), button, self.console.index)
Nenue@47 292 if button == "LeftButton" then
Nenue@47 293 if IsShiftKeyDown() then
Nenue@47 294 Devian:Console_Toggle(self.console.index, 0)
Nenue@47 295 else
Nenue@48 296 if self.console.index == DevianDB.current_channel or (not self.console.enabled) then
Nenue@48 297 Devian:Console_Toggle(self.console.index)
Nenue@48 298 if self.console.enabled then
Nenue@48 299 if self.console.minimized then
Nenue@48 300 self.console:MinMax()
Nenue@48 301 end
Nenue@48 302 self.console:ToFront()
Nenue@47 303 end
Nenue@48 304 else
Nenue@47 305 self.console:ToFront()
Nenue@47 306 end
Nenue@47 307 end
Nenue@47 308 elseif button == "RightButton" then
Nenue@47 309 self.console:MinMax()
Nenue@47 310 end
Nenue@47 311 self.console:Save()
Nenue@47 312 </OnMouseDown>
Nenue@47 313 <OnEnter>
Nenue@58 314 --print(self:GetName(),'got mouse')
Nenue@47 315 Devian.DockHighlight(self)
Nenue@47 316 </OnEnter>
Nenue@47 317 </Scripts>
Nenue@47 318 <Layers>
Nenue@47 319 <Layer level="OVERLAY">
Nenue@47 320 </Layer>
Nenue@47 321 </Layers>
Nenue@47 322 <Frames>
Nenue@58 323 <Frame name="$parentText" parentKey="caption" alpha="0" blendMode="BLEND" enableMouse="false">
Nenue@58 324 <Size x="100" y="30" />
Nenue@47 325 <Anchors>
Nenue@47 326 <Anchor point="BOTTOM" relativePoint="BOTTOM" x="0" y="0" />
Nenue@47 327 </Anchors>
Nenue@47 328 <Layers>
Nenue@47 329 <Layer level="OVERLAY">
Nenue@47 330 <FontString text="Test String" inherits="DevianText" parentKey="name" setAllPoints="true">
Nenue@47 331 <Color r="1" g="1" b="1" a="1" />
Nenue@47 332 <Shadow>
Nenue@47 333 <Color r="0" g="0" b="0" a="1" />
Nenue@47 334 <Offset x="0" y="-2" />
Nenue@47 335 </Shadow>
Nenue@47 336 <Animations>
Nenue@47 337 <AnimationGroup>
Nenue@47 338 <Scale scaleX="1.4" scaleY="1.4" looping="NONE">
Nenue@47 339 <Origin point="CENTER" x="0" y="0" />
Nenue@47 340
Nenue@47 341 </Scale>
Nenue@47 342 </AnimationGroup>
Nenue@47 343 </Animations>
Nenue@47 344 </FontString>
Nenue@47 345 </Layer>
Nenue@47 346 </Layers>
Nenue@47 347 </Frame>
Nenue@47 348 </Frames>
Nenue@47 349 </Button>
Nenue@47 350
Nenue@4 351 </Ui>