Mercurial > wow > reaction
view classes/ReBar.xml @ 7:f920db5fc6b1
version 0.3
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 20 Mar 2007 21:25:29 +0000 |
parents | dfd829db3ad0 |
children | c05fd3e18b4f |
line wrap: on
line source
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd"> <Frame name="ReBarControlEdgeTemplate" virtual="true"> <Size> <AbsDimension x="8" y="8"/> </Size> <Layers> <Layer level="HIGHLIGHT" alphaMode="ADD"> <Texture> <Color r="1.0" g="0.82" b="0" a="0.7"/> </Texture> </Layer> </Layers> <Scripts> <OnLoad> this:RegisterForDrag("LeftButton") </OnLoad> <OnMouseDown> this:GetParent().reBar:BeginBarResize(this.sizingPoint) </OnMouseDown> <OnMouseUp> this:GetParent().reBar:FinishResize() </OnMouseUp> <OnEnter> this:GetParent().reBar:ShowBarResizeTooltip(this.sizingPoint) </OnEnter> <OnLeave> GameTooltip:Hide() </OnLeave> </Scripts> </Frame> <Frame name="ReBarControlCornerTemplate" virtual="true"> <Size> <AbsDimension x="12" y="12"/> </Size> <Layers> <Layer level="HIGHLIGHT" alphaMode="ADD"> <Texture> <Color r="1.0" g="0.82" b="0" a="0.7"/> </Texture> </Layer> </Layers> <Scripts> <OnLoad> this:RegisterForDrag("LeftButton","RightButton") </OnLoad> <OnMouseDown> this:GetParent():GetParent().reBar:BeginButtonResize(this.sizingPoint, arg1) </OnMouseDown> <OnMouseUp> this:GetParent():GetParent().reBar:FinishResize() </OnMouseUp> <OnEnter> this:GetParent():GetParent().reBar:ShowButtonResizeTooltip(this.sizingPoint) </OnEnter> <OnLeave> GameTooltip:Hide() </OnLeave> </Scripts> </Frame> <Button name="ReBarPageArrowTemplate" inherits="SecureAnchorButtonTemplate" virtual="true"> <Size> <AbsDimension x="32" y="32"/> </Size> <Layers> <Layer level="BACKGROUND"> <Color r="1" g="1" b="0" setAllPoints="true"/> </Layer> </Layers> <HitRectInsets> <AbsInset left="6" right="6" top="7" bottom="7"/> </HitRectInsets> </Button> <!-- A ReBar is a container for buttons. The bar container itself is invisible and non-responsive to mouse input, but when unlocked a normally invisible child control frame becomes visible and consumes mouse events to move, resize, and set bar options. --> <Frame name="ReBarTemplate" inherits="SecureStateDriverTemplate" frameStrata="MEDIUM" virtual="true" toplevel="true" movable="true" resizable="true"> <Frames> <Frame name="$parentControl" setAllPoints="true"> <!-- this nesting is to ensure the control frame is on top of the buttons, which will live at this level --> <Frames> <!-- name: e.g. $parentControls (with an s) - yes I know, goofy naming structure --> <Button name="$parents" hidden="true" enableMouse="true" setAllPoints="true"> <Anchors> <Anchor point="TOPLEFT"> <Offset> <AbsDimension x="-4" y="4"/> </Offset> </Anchor> <Anchor point="BOTTOMRIGHT"> <Offset> <AbsDimension x="4" y="-4"/> </Offset> </Anchor> </Anchors> <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true"> <EdgeSize> <AbsValue val="16"/> </EdgeSize> <TileSize> <AbsValue val="16"/> </TileSize> <BackgroundInsets> <AbsInset left="0" right="0" top="0" bottom="0"/> </BackgroundInsets> </Backdrop> <Layers> <Layer level="BACKGROUND"> <Texture> <!-- offsets so that the highlight layer plays nice with the edge border --> <Anchors> <Anchor point="TOPLEFT"> <Offset> <AbsDimension x="4" y="-4"/> </Offset> </Anchor> <Anchor point="BOTTOMRIGHT"> <Offset> <AbsDimension x="-4" y="4"/> </Offset> </Anchor> </Anchors> <Color r="0.7" g="0.7" b="1.0" a="0.2"/> </Texture> </Layer> <Layer level="HIGHLIGHT"> <Texture alphaMode="ADD"> <Anchors> <Anchor point="TOPLEFT"> <Offset> <AbsDimension x="4" y="-4"/> </Offset> </Anchor> <Anchor point="BOTTOMRIGHT"> <Offset> <AbsDimension x="-4" y="4"/> </Offset> </Anchor> </Anchors> <Color r="0.7" g="0.7" b="1.0" a="0.2"/> </Texture> </Layer> <Layer level="OVERLAY"> <FontString name="$parentLabelString" inherits="GameFontNormalLarge" justifyH="CENTER" text="(barID)" setAllPoints="true" outline="THICK"> <Anchors> <Anchor point="CENTER"/> </Anchors> <Shadow> <Offset> <AbsDimension x="2" y="-2"/> </Offset> <Color r="0" g="0" b="0" a="1"/> </Shadow> <Color r="1" g="1" b="1" a="1"/> </FontString> </Layer> </Layers> <Frames> <!-- edge drag handles --> <Frame inherits="ReBarControlEdgeTemplate"> <Anchors> <Anchor point="TOPLEFT"/> <Anchor point="TOPRIGHT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "TOP" </OnLoad> </Scripts> </Frame> <Frame inherits="ReBarControlEdgeTemplate"> <Anchors> <Anchor point="TOPLEFT"/> <Anchor point="BOTTOMLEFT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "LEFT" </OnLoad> </Scripts> </Frame> <Frame inherits="ReBarControlEdgeTemplate"> <Anchors> <Anchor point="TOPRIGHT"/> <Anchor point="BOTTOMRIGHT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "RIGHT" </OnLoad> </Scripts> </Frame> <Frame inherits="ReBarControlEdgeTemplate"> <Anchors> <Anchor point="BOTTOMLEFT"/> <Anchor point="BOTTOMRIGHT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "BOTTOM" </OnLoad> </Scripts> </Frame> <!-- corner drag handles --> <Frame setAllPoints="true"> <!-- nesting to ensure they're on top --> <Frames> <Frame inherits="ReBarControlCornerTemplate"> <Anchors> <Anchor point="TOPLEFT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "TOPLEFT" </OnLoad> </Scripts> </Frame> <Frame inherits="ReBarControlCornerTemplate"> <Anchors> <Anchor point="TOPRIGHT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "TOPRIGHT" </OnLoad> </Scripts> </Frame> <Frame inherits="ReBarControlCornerTemplate"> <Anchors> <Anchor point="BOTTOMLEFT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "BOTTOMLEFT" </OnLoad> </Scripts> </Frame> <Frame inherits="ReBarControlCornerTemplate"> <Anchors> <Anchor point="BOTTOMRIGHT"/> </Anchors> <Scripts> <OnLoad> this.sizingPoint = "BOTTOMRIGHT" </OnLoad> </Scripts> </Frame> </Frames> </Frame> </Frames> <Scripts> <OnLoad> this:RegisterForDrag("LeftButton") this:RegisterForClicks("AnyUp") </OnLoad> <OnDragStart> this.reBar:BeginDrag() </OnDragStart> <OnDragStop> this.reBar:FinishDrag() </OnDragStop> <OnEnter> this.reBar:ShowTooltip() </OnEnter> <OnLeave> GameTooltip:Hide() </OnLeave> </Scripts> </Button> </Frames> </Frame> <Button name="$parentPageUp" inherits="ReBarPageArrowTemplate" hidden="true"> <Scripts> <OnLoad> this:SetAttribute("anchorchild",this:GetParent()) this:SetAttribute("childstate","^next") </OnLoad> </Scripts> <NormalTexture file="Interface\MainMenuBar\UI-MainMenu-ScrollUpButton-Up"/> <PushedTexture file="Interface\MainMenuBar\UI-MainMenu-ScrollUpButton-Down"/> <DisabledTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Disabled"/> <HighlightTexture alphaMode="ADD" file="Interface\MainMenuBar\UI-MainMenu-ScrollUpButton-Highlight"/> </Button> <Button name="$parentPageDown" inherits="ReBarPageArrowTemplate" hidden="true"> <Scripts> <OnLoad> this:SetAttribute("anchorchild",this:GetParent()) this:SetAttribute("childstate","^prev") </OnLoad> </Scripts> <NormalTexture file="Interface\MainMenuBar\UI-MainMenu-ScrollDownButton-Up"/> <PushedTexture file="Interface\MainMenuBar\UI-MainMenu-ScrollDownButton-Down"/> <DisabledTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Disabled"/> <HighlightTexture alphaMode="ADD" file="Interface\MainMenuBar\UI-MainMenu-ScrollDownButton-Highlight"/> </Button> <Frame name="$parentPage"> <Frames> <!-- nesting so it appears on top of arrows --> <Frame name="$parentNumber"> <Size> <AbsDimension x="12" y="12"/> </Size> <Layers> <Layer level="BACKGROUND"> <Texture> <Color r="0.2" g="0.2" b="0.2" a="1.0"/> </Texture> </Layer> </Layers> <Frames> <Frame name="$parentLabel"> <Size> <AbsDimension x="18" y="18"/> </Size> <Anchors> <Anchor point="CENTER"/> </Anchors> <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true"> <EdgeSize> <AbsValue val="12"/> </EdgeSize> <TileSize> <AbsValue val="12"/> </TileSize> </Backdrop> <Layers> <Layer level="ARTWORK"> <FontString name="$parentText" inherits="GameFontNormalSmall" text="0"> <Anchors> <Anchor point="CENTER"/> </Anchors> <Color r="1.0" g="0.82" b="0"/> </FontString> </Layer> </Layers> </Frame> </Frames> </Frame> </Frames> </Frame> </Frames> </Frame> </Ui>