View Single Post
05-28-09, 11:51 AM   #19
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
actually... ill post the whole code in a sec. the reason im useing background and frame lvls is because i have aggro graphixs setup as well as other mods buttons and frames ontop of th e background art. the background art is broke down into 6 main pieces just as the old MazzleUI was. lower left chat frame, middle left button backgrounds, map skin, middle right button backgrounds, bottom right chat frame, and then the targeting skin. All of which need to overlap in a certain way to create a cleaner look but still layer properly with other mods as well as other elements of the core im working on. the entire code for this particular XML file is as follows. It controls the primary art and target functions. It is a lot of code but you can see how each frame is its own parent. all of which should be attached to the main UIparent frame so it hides properly when hitting alt-z.

Code:
<Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Frame name="GrimUIcoreArtB1" parent="UIParent" frameStrata="BACKGROUND"  frameLevel="0">
        <Size>
      <AbsDimension x="300" y="152" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOMLEFT" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="0" y="0" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\Bottom1">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
  </Frame>
<Frame name="GrimUIcoreArtB4" frameStrata="BACKGROUND" parent="UIParent" frameLevel="1">
        <Size>
      <AbsDimension x="303" y="152" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOMRIGHT" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="0" y="0" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\Bottom4">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
  </Frame>
<Frame name="GrimUIcoreArtB2" frameStrata="BACKGROUND" parent="UIParent" frameLevel="0">
        <Size>
      <AbsDimension x="361" y="152" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOM" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="-135" y="0" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\Bottom2">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
  </Frame>
<Frame name="GrimUIcoreArtB3" frameStrata="BACKGROUND" parent="UIParent" frameLevel="0">
        <Size>
      <AbsDimension x="301" y="152" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOM" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="176" y="0" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\Bottom3">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
  </Frame>
<Frame name="GrimUIcoreArtMM" frameStrata="LOW" parent="UIParent" frameLevel="0">
        <Size>
      <AbsDimension x="158" y="164" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOM" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="-25" y="-53" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\MinimapBorder">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
  </Frame>
<Frame name="GrimUIcoreArtTarget" parent="DUF_TargetFrame" frameStrata="BACKGROUND" parent="UIParent" frameLevel="4">
        <Size>
      <AbsDimension x="207" y="210" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOM" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="0" y="118" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\FloatingCave">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
        <Frames>
      <Button name="$InspectButton" frameStrata="HIGH" hidden="true">
                <Size>
          <AbsDimension x="15" y="15" />
        </Size>
        <Anchors>
          <Anchor point="CENTER">
            <Offset>
              <AbsDimension x="50" y="-50" />
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnLoad>self:RegisterEvent("UNIT_TARGET")
self:Hide()</OnLoad>
          <OnEvent>if UnitExists("target") and UnitIsPlayer("target") == nil then
  self:Hide()
else
  self:Show()
end</OnEvent>
          <OnClick>InspectUnit("target")</OnClick>
        </Scripts>
        <NormalTexture file="Interface\AddOns\GrimUIcore\Icons\InspectIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </NormalTexture>
        <PushedTexture file="Interface\AddOns\GrimUIcore\Icons\InspectIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </PushedTexture>
        <DisabledTexture file="Interface\AddOns\GrimUIcore\Icons\InspectIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </DisabledTexture>
        <HighlightTexture file="Interface\AddOns\GrimUIcore\Icons\InspectIcon" alphaMode="ADD">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </HighlightTexture>
        <ButtonText name="$parentText">
          <FontHeight>
            <AbsValue val="10" />
          </FontHeight>
        </ButtonText>
        <NormalFont style="GameFontNormal" />
        <HighlightFont style="GameFontHighlight" />
        <DisabledFont style="GameFontDisable" />
      </Button>
    <Button name="$TradeButton" frameStrata="HIGH" hidden="true">
                <Size>
          <AbsDimension x="15" y="15" />
        </Size>
        <Anchors>
          <Anchor point="CENTER">
            <Offset>
              <AbsDimension x="50" y="-35" />
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnLoad>self:RegisterEvent("UNIT_TARGET")
self:Hide()</OnLoad>
          <OnEvent>if UnitIsFriend("player","target") and UnitIsPlayer("target") then
self:Show()
else
self:Hide()
end</OnEvent>
          <OnClick>InitiateTrade("target")</OnClick>
        </Scripts>
        <NormalTexture file="Interface\AddOns\GrimUIcore\Icons\TradeIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </NormalTexture>
        <PushedTexture file="Interface\AddOns\GrimUIcore\Icons\TradeIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </PushedTexture>
        <DisabledTexture file="Interface\AddOns\GrimUIcore\Icons\TradeIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </DisabledTexture>
        <HighlightTexture file="Interface\AddOns\GrimUIcore\Icons\TradeIcon" alphaMode="ADD">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </HighlightTexture>
        <ButtonText name="$parentText">
          <FontHeight>
            <AbsValue val="10" />
          </FontHeight>
        </ButtonText>
        <NormalFont style="GameFontNormal" />
        <HighlightFont style="GameFontHighlight" />
        <DisabledFont style="GameFontDisable" />
      </Button>
    <Button name="$FollowButton" frameStrata="HIGH" hidden="true">
                <Size>
          <AbsDimension x="15" y="15" />
        </Size>
        <Anchors>
          <Anchor point="CENTER">
            <Offset>
              <AbsDimension x="-50" y="-35" />
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnLoad>self:RegisterEvent("UNIT_TARGET")
self:Hide()</OnLoad>
          <OnEvent>if UnitIsFriend("player","target") and UnitIsPlayer("target") then
self:Show()
else
self:Hide()
end</OnEvent>
          <OnClick>FollowUnit("target")</OnClick>
        </Scripts>
        <NormalTexture file="Interface\AddOns\GrimUIcore\Icons\FollowIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </NormalTexture>
        <PushedTexture file="Interface\AddOns\GrimUIcore\Icons\FollowIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </PushedTexture>
        <DisabledTexture file="Interface\AddOns\GrimUIcore\Icons\FollowIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </DisabledTexture>
        <HighlightTexture file="Interface\AddOns\GrimUIcore\Icons\FollowIcon" alphaMode="ADD">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </HighlightTexture>
        <ButtonText name="$parentText">
          <FontHeight>
            <AbsValue val="10" />
          </FontHeight>
        </ButtonText>
        <NormalFont style="GameFontNormal" />
        <HighlightFont style="GameFontHighlight" />
        <DisabledFont style="GameFontDisable" />
      </Button>
      <Button name="$WhisperButton" frameStrata="HIGH" hidden="true">
                <Size>
          <AbsDimension x="15" y="15" />
        </Size>
        <Anchors>
          <Anchor point="CENTER">
            <Offset>
              <AbsDimension x="-50" y="-50" />
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnLoad>self:RegisterEvent("UNIT_TARGET")
self:Hide()</OnLoad>
          <OnEvent>if UnitIsFriend("player","target") and UnitIsPlayer("target") then
self:Show()
else
self:Hide()
end</OnEvent>
          <OnClick>local name, realm = UnitName("target");
if(realm) then
   ChatFrame_SendTell(name.."-"..realm);
else
   ChatFrame_SendTell(name)
 end</OnClick>
        </Scripts>
        <NormalTexture file="Interface\AddOns\GrimUIcore\Icons\WhisperIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </NormalTexture>
        <PushedTexture file="Interface\AddOns\GrimUIcore\Icons\WhisperIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </PushedTexture>
        <DisabledTexture file="Interface\AddOns\GrimUIcore\Icons\WhisperIcon">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </DisabledTexture>
        <HighlightTexture file="Interface\AddOns\GrimUIcore\Icons\WhisperIcon" alphaMode="ADD">
          <TexCoords left="0" right="1" top="0" bottom="1" />
        </HighlightTexture>
        <ButtonText name="$parentText">
          <FontHeight>
            <AbsValue val="10" />
          </FontHeight>
        </ButtonText>
        <NormalFont style="GameFontNormal" />
        <HighlightFont style="GameFontHighlight" />
        <DisabledFont style="GameFontDisable" />
      </Button>
    </Frames>
  </Frame>
<Frame name="GrimUIcoreArtAggroL" alpha="0.50" frameStrata="LOW" parent="UIParent" frameLevel="2">
        <Size>
      <AbsDimension x="63" y="65" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOM" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="-347" y="14" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\Aggro">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
    <Scripts>
      <OnLoad>self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:Hide()</OnLoad>
      <OnEvent>if event == "PLAYER_REGEN_ENABLED" then
self:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
self:Show()
end</OnEvent>
    </Scripts>
  </Frame>
  <Frame name="GrimUIcoreArtAggroR" alpha="0.50" frameStrata="LOW" parent="UIParent" frameLevel="2">
        <Size>
      <AbsDimension x="66" y="65" />
    </Size>
    <Anchors>
      <Anchor point="BOTTOM" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="344" y="14" />
        </Offset>
      </Anchor>
    </Anchors>
    <Backdrop bgFile="interface\AddOns\GrimUIcore\Art\Aggro">
      <BackgroundInsets>
        <AbsInset left="0" right="0" top="0" bottom="0" />
      </BackgroundInsets>
      <TileSize>
        <AbsValue val="0" />
      </TileSize>
      <EdgeSize>
        <AbsValue val="0" />
      </EdgeSize>
    </Backdrop>
    <Scripts>
      <OnLoad>self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:Hide()</OnLoad>
      <OnEvent>if event == "PLAYER_REGEN_ENABLED" then
self:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
self:Show()
end</OnEvent>
    </Scripts>
  </Frame>
</Ui>
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote