Mercurial > wow > devian
view Devian.xml @ 14:5254d1ba6013 v1.2-r15
Multiple output windows can be created for different output prefixes, and prefixes can be designated to an existing or new "console" with /dvn <prefix> <console>
Frame objects are generated directly from XML data, and their state information is stored in the object itself to resolve issues with GetWidth() returning old info in some cases.
StackFrames and DistributeFrames methods can be invoked from /script to arrange the buffers.
author | Nenue |
---|---|
date | Sun, 20 Dec 2015 00:46:42 -0500 |
parents | 080dfa4990fb |
children | 31ca76e04766 |
line wrap: on
line source
<Ui> <Texture name="DevianBorder" virtual="true" setAllPoints="false"> <Color r="1" g="0" b="0" a="1" /> <Size x="2" y="2" /> </Texture> <Frame name="DevianConsole" parent="UIParent" enableMouse="true" enableMouseWheel="true" clampedToScreen="true" movable="true" resizable="true" toplevel="true" hidden="true" virtual="true"> <ResizeBounds> <minResize x="200" y="20" /> <maxResize x="1920" y="1200" /> </ResizeBounds> <Scripts> <OnShow></OnShow> <OnMouseDown> self:ToFront() if button == 'LeftButton' then if self.out.grip:IsMouseOver() then return self:StartSizing() end return self:StartMoving() end </OnMouseDown> <OnMouseUp> if button == 'RightButton' then return self:MinMax() end self:StopMovingOrSizing() self.x = nil -- free these up self.y = nil self.width = nil self.height = nil self:Save() </OnMouseUp> <OnMouseWheel> local up = delta > 0 if IsControlKeyDown() then if up then self.out:ScrollToTop() else self.out:ScrollToBottom() end elseif IsShiftKeyDown() then if up then self.out:PageUp() else self.out:PageDown() end else if up then self.out:ScrollUp() else self.out:ScrollDown() end end </OnMouseWheel> <OnUpdate> if not self.throttle then self.throttle = GetTime() elseif (GetTime()-self.throttle < 0.2) then return else self.throttle = GetTime() end local text = string.gsub(self.format, '%%t', GetTime(), 1) text = string.gsub(text, '%%n', self.signature, 1) self.header:SetText(text) </OnUpdate> </Scripts> <Frames> <ScrollingMessageFrame name="$parentScrollFrame" parentkey="out" maxLines="500" fade="false" displayduration="2147483647" insertMode="BOTTOM"> <Anchors> <Anchor point="TOPLEFT" y="-20" /> <Anchor point="BOTTOMRIGHT" /> </Anchors> <FontString font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" wordwrap="true" justifyH="LEFT" indented="true" setAllPoints="true"> <FontHeight> <AbsValue val="13"/> </FontHeight> </FontString> <Layers> <Layer level="BACKGROUND"> <Texture name="$parentbg" parentKey="backdrop" setAllPoints="true" alphaMode="BLEND"> <Color r="1" g="1" b="1" a="1"/> <Gradient orientation="VERTICAL"> <MinColor r="0" g="0" b="0" a="0.7"/> <MaxColor r="0" g="0" b="0" a="0.3"/> </Gradient> </Texture> </Layer> <Layer level="OVERLAY"> <Texture name="DevianGripper" file="Interface\Addons\Devian\corner.blp" parentKey="grip" strata="HIGH" alphaMode="ADD"> <Anchors> <Anchor point="BOTTOMRIGHT" x="-1" y="1" /> </Anchors> <Size x="18" y="18" /> <Color r="1" g="1" b="1" a="1"/> <Gradient orientation="VERTICAL"> <MaxColor r="0.2" g="0.2" b="0.2" a="1"/> <MinColor r="0.5" g="0.5" b="0.5" a="1"/> </Gradient> </Texture> </Layer> </Layers> </ScrollingMessageFrame> </Frames> <Layers> <Layer level="BORDER"> <Texture parentKey="titlebar" alphaMode="BLEND"> <Anchors> <Anchor point="TOPLEFT" /> <Anchor point="TOPRIGHT" /> </Anchors> <Size y="20" /> <Color r="0.3" g="0.3" b="0.3" a="1" /> <Gradient orientation="VERTICAL"> <MinColor r="0" g="0" b="0" a="0.7"/> <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/> </Gradient> </Texture> <FontString parentKey="header" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true" justifyH="LEFT" indented="true"> <Anchors> <Anchor point="TOPLEFT" x="4" y="-2" /> <Anchor point="TOPRIGHT" x="-4" /> </Anchors> <Size y="20" /> <FontHeight> <AbsValue val="12"/> </FontHeight> </FontString> </Layer> <Layer level="BORDER"> <Texture name="DevBorderUR" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" /> </Anchors> </Texture> <Texture name="DevBorderU" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="TOPLEFT" y="2" /> <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" /> </Anchors> </Texture> <Texture name="DevBorderUL" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="BOTTOMRIGHT" parentArray="border" relativePoint="TOPLEFT" /> </Anchors> </Texture> <Texture name="DevBorderL" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="TOPLEFT" x="-2" /> <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" /> </Anchors> </Texture> <Texture name="DevBorderBL" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="TOPRIGHT" relativePoint="BOTTOMLEFT" /> </Anchors> </Texture> <Texture name="DevBorderB" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" /> <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" y="-2" /> </Anchors> </Texture> <Texture name="DevBorderBR" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT" /> </Anchors> </Texture> <Texture name="DevBorderR" parentArray="border" inherits="DevianBorder"> <Anchors> <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" /> <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" /> </Anchors> </Texture> </Layer> </Layers> </Frame> </Ui>