annotate Devian.xml @ 6:b526dc930b15

leftover sizer fuckery
author Nenue
date Fri, 18 Dec 2015 20:15:01 -0500
parents ac644fc860cc
children d0cd0e68213e
rev   line source
Nenue@4 1 <Ui>
Nenue@4 2 <Frame name="DevianConsole" parent="UIParent" enableMouse="true" enableMouseWheel="true" movable="true" resizable="true" toplevel="true" hidden="true" clampedToScreen="true">
Nenue@4 3
Nenue@4 4 <Size width="500" height="600"/>
Nenue@4 5 <KeyValues>
Nenue@4 6 <KeyValue key="format" value="Devian [%s]" />
Nenue@4 7 </KeyValues>
Nenue@5 8 <ResizeBounds>
Nenue@5 9 <minResize x="200" y="20" />
Nenue@5 10 <maxResize x="1920" y="1200" />
Nenue@5 11 </ResizeBounds>
Nenue@4 12 <Scripts>
Nenue@4 13 <OnMouseDown>
Nenue@4 14 if button == 'LeftButton' then
Nenue@4 15 if self.sizer:IsMouseOver() then
Nenue@4 16 return self:StartSizing()
Nenue@4 17 end
Nenue@4 18 return self:StartMoving()
Nenue@4 19 end
Nenue@4 20 </OnMouseDown>
Nenue@4 21 <OnMouseUp>
Nenue@4 22 if button == 'RightButton' then
Nenue@5 23 return Devian:ToggleMinMax()
Nenue@4 24 end
Nenue@4 25 self:StopMovingOrSizing()
Nenue@4 26 Devian:SavePos()
Nenue@4 27 </OnMouseUp>
Nenue@4 28 <OnMouseWheel>
Nenue@4 29 local up = delta > 0
Nenue@4 30 if IsControlKeyDown() then
Nenue@4 31 if up then self.console:ScrollToTop()
Nenue@4 32 else self.console:ScrollToBottom() end
Nenue@4 33 elseif IsShiftKeyDown() then
Nenue@4 34 if up then self.console:PageUp()
Nenue@4 35 else self.console:PageDown() end
Nenue@4 36 else
Nenue@4 37 if up then self.console:ScrollUp()
Nenue@4 38 else self.console:ScrollDown() end
Nenue@4 39 end
Nenue@4 40 </OnMouseWheel>
Nenue@4 41 <OnUpdate>
Nenue@4 42 if not self.throttle then
Nenue@4 43 self.throttle = GetTime()
Nenue@4 44 elseif (GetTime()-self.throttle &lt; 0.2) then
Nenue@4 45 return
Nenue@4 46 else
Nenue@4 47 self.throttle = GetTime()
Nenue@4 48 end
Nenue@4 49
Nenue@4 50 self.text:SetText(string.format(self.format, GetTime()))
Nenue@4 51 </OnUpdate>
Nenue@4 52 </Scripts>
Nenue@4 53
Nenue@4 54 <Frames>
Nenue@4 55 <ScrollingMessageFrame name="$parentBuffer" parentkey="console" maxLines="500" displayduration="2000000">
Nenue@4 56 <Anchors>
Nenue@4 57 <Anchor point="TOPLEFT" y="-20" />
Nenue@4 58 <Anchor point="BOTTOMRIGHT" />
Nenue@4 59 </Anchors>
Nenue@5 60 <FontString font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" wordwrap="true"
Nenue@4 61 justifyH="LEFT"
Nenue@4 62 indented="true"
Nenue@4 63 setAllPoints="true">
Nenue@4 64 <FontHeight>
Nenue@5 65 <AbsValue val="13"/>
Nenue@4 66 </FontHeight>
Nenue@4 67 </FontString>
Nenue@4 68
Nenue@4 69 <Layers>
Nenue@4 70 <Layer level="BACKGROUND">
Nenue@4 71 <Texture name="DevianConsoleBG" parentKey="backdrop" setAllPoints="true" alphaMode="MOD">
Nenue@4 72 <Color r="1" g="1" b="1" a="1"/>
Nenue@4 73 <Gradient orientation="HORIZONTAL">
Nenue@4 74 <MinColor a="1" r="0" g="0" b="0"/>
Nenue@4 75 <MaxColor a="1" r="1" g="1" b="1"/>
Nenue@4 76 </Gradient>
Nenue@4 77 </Texture>
Nenue@4 78 </Layer>
Nenue@4 79 </Layers>
Nenue@4 80 </ScrollingMessageFrame>
Nenue@4 81 </Frames>
Nenue@4 82 <Layers>
Nenue@4 83 <Layer level="OVERLAY">
Nenue@4 84 <Texture parentKey="tbar" alphaMode="BLEND">
Nenue@4 85 <Anchors>
Nenue@4 86 <Anchor point="TOPLEFT" />
Nenue@4 87 <Anchor point="TOPRIGHT" />
Nenue@4 88 </Anchors>
Nenue@4 89 <Size y="20" />
Nenue@4 90 <Color r="0.3" g="0.3" b="0.3" a="1" />
Nenue@4 91 </Texture>
Nenue@5 92 <FontString parentKey="text" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true"
Nenue@4 93 justifyH="LEFT"
Nenue@4 94 indented="true">
Nenue@4 95 <Anchors>
Nenue@4 96 <Anchor point="TOPLEFT" x="4" y="-2" />
Nenue@4 97 <Anchor point="TOPRIGHT" x="-4" />
Nenue@4 98 </Anchors>
Nenue@4 99 <Size y="20" />
Nenue@4 100 <FontHeight>
Nenue@4 101 <AbsValue val="12"/>
Nenue@4 102 </FontHeight>
Nenue@4 103 </FontString>
Nenue@4 104 </Layer>
Nenue@4 105 <Layer level="HIGHLIGHT">
Nenue@4 106 <Texture parentKey="sizer" alphaMode="BLEND">
Nenue@4 107 <Anchors>
Nenue@4 108 <Anchor point="BOTTOMRIGHT" />
Nenue@4 109 </Anchors>
Nenue@4 110 <Size x="20" y="20" />
Nenue@4 111 <Color r="1" g="1" b="1" a="0.7"/>
Nenue@4 112 </Texture>
Nenue@4 113 </Layer>
Nenue@4 114 </Layers>
Nenue@4 115 </Frame>
Nenue@4 116 </Ui>