diff ReBar.xml @ 1:c11ca1d8ed91

Version 0.1
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:03:57 +0000
parents
children 8e0ff8ae4c08
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ReBar.xml	Tue Mar 20 21:03:57 2007 +0000
@@ -0,0 +1,318 @@
+<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>
+
+
+
+  <Frame name="ReBarStickyIndicatorTemplate" virtual="true" frameStrata="HIGH" enableMouse="false" hidden="true" parent="UIParent">
+    <Size>
+      <AbsDimension x="8" y="8"/>
+    </Size>
+    <Layers>
+      <Layer level="OVERLAY">
+        <Texture alphaMode="ADD">
+          <Color r="1.0" g="0.82" b="0" a="0.8"/>
+        </Texture>
+      </Layer>
+    </Layers>
+  </Frame>
+
+  <Frame name="ReBarStickyIndicator1" inherits="ReBarStickyIndicatorTemplate"/>
+  <Frame name="ReBarStickyIndicator2" inherits="ReBarStickyIndicatorTemplate"/>
+
+
+  <!-- A ReAction bar 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" virtual="true" frameStrata="HIGH" enableMouse="true" movable="true" resizable="true">
+    <Layers>
+      <Layer level="BACKGROUND"/>
+    </Layers>
+    <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>
+            </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>
+
+              <Frame name="$parentLabel">
+                <Size>
+                  <AbsDimension x="32" y="24"/>
+                </Size>
+                <Anchors>
+                  <Anchor point="CENTER"/>
+                </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>
+                      <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.0" g="0.0" b="0.0"/>
+                    </Texture>
+                  </Layer>
+                  <Layer level="ARTWORK">
+                    <FontString name="$parentString" inherits="GameFontNormalLarge" justifyH="CENTER" text="(barID)">
+                      <Size>
+                        <AbsDimension x="24" y="18"/>
+                      </Size>
+                      <Anchors>
+                        <Anchor point="CENTER"/>
+                      </Anchors>
+                    </FontString>
+                  </Layer>
+                </Layers>
+              </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>
+    </Frames>
+  </Frame>
+
+
+</Ui>