Thread Tools Display Modes
05-27-09, 10:19 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
UI not hiding when its supposed to.

So i just noticed that all of my interface that i did in XML does not hide when i hit the hot key for hide interface. ctrl-z or x or what ever its default is....

piece of code that they all need to have to hide them or what?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-27-09, 10:49 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Did you try Alt Z as well .. I can never remember the correct key combination so end up doing both.

If not, I am assuming that combo hides the UIParent which means anything that it is a parent for should be hidden and so forth down the chain. I apologise if I am wrong and would love to know what it does do if that isn't the case.

The only thing I can think of at the top of my head that would cause it to not do it is if the parents of your frames are not UIParent.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
05-27-09, 11:12 PM   #3
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
im pretty sure i put UIparent as the main anchors. when i hit alt-WhatEverButtonItIs everything except for the things controlled by the xml's i have written, hide. also just noticed, any time a video plays my UI pieces stay visible lol. was kinda cool having the main button for my UI smack dab in the middle of the screen for a video quest finish lol. Not cool enough to leave it that way though. lol. pulling some of my code right now and pasting it.

all my anchor tags say UIparent but as i am just learning lua and xml it could be wrong or missing something.

Code:
<Frame name="GrimUIcoreArtB1" 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>
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-27-09, 11:17 PM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Well looking at some of the tutorials on wowwiki maybe UIParent is assumed so scratch that option. All of my addons are pure lua coding so I am not totally knowledgeable about the xml side of things.

Perhaps someone else can confirm that your code is fine.

What you can do though is test a simple addon that is out there and see if that is similarly afflicted. If it works fine with that then use that to work your addon functionality on and maybe it will work this time.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
05-27-09, 11:24 PM   #5
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
right now my UI consists of both lua and xml. my lua frames hide like they should. Like i said im learning but one thing i noticed is xml and lua are pretty much the same xml is just structured different and starts with /commands rather then just starting out with straight script code. The script code though is the same. I cut and past stuff from xml to lua and vice averse all the time and get the desired affect for the most part. i saw a website that has a converter somewhere to but i have not tried it yet i hear its kinda sloppy on its conversions though.

anyhoo well hopefully someone sees it and notices whats wrong. in the meantime im going to study what that hide command actually says and see if i can fix it by understanding that more.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-28-09, 12:02 AM   #6
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
Wink XML could be missing

Originally Posted by Grimsin View Post
im pretty sure i put UIparent as the main anchors. when i hit alt-WhatEverButtonItIs everything except for the things controlled by the xml's i have written, hide. also just noticed, any time a video plays my UI pieces stay visible lol. was kinda cool having the main button for my UI smack dab in the middle of the screen for a video quest finish lol. Not cool enough to leave it that way though. lol. pulling some of my code right now and pasting it.

all my anchor tags say UIparent but as i am just learning lua and xml it could be wrong or missing something.

Code:
<Frame name="GrimUIcoreArtB1" 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>
Hey there, I am no expert but I use xml frames and have my share of hassles.. Is the above only a part of the xml or is it the whole deal? If its the whole deal, then you're missing heaps...The top of the xml should look something like this.
Code:
<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="MyModFrame" alpha="0.9" hidden="true" movable="true" resizable="true" parent="UIParent" toplevel="true" enableMouse="true">
    <Size>
      <AbsDimension x="768" y="514" />
    </Size>
Keep in mind though that the main aspects of the frame don't necisarily have to have the alpha, resize, or movable. Hidden just says hidden in the beginning and shows when called. Hope that helped.
__________________
To give is to receive so the more that you give the more that you receive.
  Reply With Quote
05-28-09, 04:31 AM   #7
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
I have that top junk, i do see something that might make the difference.

parent="UIParent" in the main frame creation tag. I dont have that hehe maybe thats why. Ill test it in the morning
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-28-09, 05:30 AM   #8
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
It is that. You are not parenting your frame to UIParent in your xml code, so that it can be hidden when using Alt-Z (which essentially hides the UIParent and obviously all of its child frames).
__________________
  Reply With Quote
05-28-09, 09:58 AM   #9
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Well that may have done it but im guessing that when i added those it caused the frames to assume the parent UI's siZe and scaling and now i have to redo that lol.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-28-09, 10:13 AM   #10
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Ok, so i added that and now i seem to have lost my frames all together. Upon adding that is there something else i need to add?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-28-09, 10:25 AM   #11
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
Red face Strange disappearance?

Originally Posted by Grimsin View Post
Well that may have done it but im guessing that when i added those it caused the frames to assume the parent UI's siZe and scaling and now i have to redo that lol.
I do appologise....if you know the original frame size, then replace the dimensions below with yours. If your frame has hidden itself, ensure that the "hidden" tag is set to false while working on it or use a slash command to show the frame.

Code:
    <Size>
      <AbsDimension x="768" y="514" />
    </Size>
__________________
To give is to receive so the more that you give the more that you receive.
  Reply With Quote
05-28-09, 10:28 AM   #12
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
Post Hmm

Originally Posted by Grimsin View Post
Ok, so i added that and now i seem to have lost my frames all together. Upon adding that is there something else i need to add?
If the frames have diasppeared, it could be because of two reasons, firstly the hidden tag is set to true in which case you need to show the frame from a slash command or secondly there is an error in the xml which will prevent it from showing. If you use a mod like swatter, it will display any errors for you.
__________________
To give is to receive so the more that you give the more that you receive.
  Reply With Quote
05-28-09, 11:17 AM   #13
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
One of my xml frames is still on screen and functioning although size and location changed when adding that line. My other frames how ever are missing all together i changed the position to absolute center and they still do not show. Here is the code. it shows nothing

Code:
<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="GrimUIcoreArtB1" parent="UIParent" frameStrata="BACKGROUND"  frameLevel="0">
        <Size>
      <AbsDimension x="300" y="152" />
    </Size>
    <Anchors>
      <Anchor point="CENTER" 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>
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-28-09, 11:33 AM   #14
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
the frame that is on screen is the main frame I take it...If so how are the other frames linked to it?.....The uiparent tag is for the main frame or parent..if you have other frames that fit into that frame, then the parent would be the first eg..

<Frame name="GrimUIcoreArtB1" parent="UIParent" frameStrata="BACKGROUND" frameLevel="0">

this is say frame 1

<Frame name="GrimUIcoreArtB1" parent="GrimUIcoreArtB1" frameStrata="BACKGROUND" frameLevel="0">

this would be frame 2

This setup is for a parent frame and a frame like a panel to be placed inside the parent frame.

If they are all singular frames that are hidden,, you need to show those frames from a button for eg... it all depends on the layout of your mod.

also curiosity wise, how come the strata is set to bg? I only use framestrata when needing to raise or lower an object. I'm still learning too The code I posted earlier, I use in all frames with size differences of course...lol.... My current mod uses a single main frame (parent) and 5 subframes in it (children) which are set up slightly different.
__________________
To give is to receive so the more that you give the more that you receive.

Last edited by Samsan : 05-28-09 at 11:36 AM.
  Reply With Quote
05-28-09, 11:40 AM   #15
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
i just noticed something very odd.... the absdimensions are different when anchored to the UIparent. IE x used to be 9 for the proper placement its now 0. is the edge of the parent frame not the edge of the screen as my x/y
s were without setting a parentframe?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
05-28-09, 11:40 AM   #16
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
Post What I prefer.

The parent frame settings that I use are:
Code:
<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="DWMPackBaseFrame" alpha="0.9" hidden="true" movable="true" resizable="true" parent="UIParent" toplevel="true" enableMouse="true">
    <Size>
      <AbsDimension x="768" y="514" />
    </Size>
    <Anchors>
      <Anchor point="TOPLEFT" relativeTo="UIParent">
        <Offset>
          <AbsDimension x="0" y="-77" />
        </Offset>
      </Anchor>
The subframes or child frame settings I use are:
Code:
<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/
  <Frame name="DWMPackRepFrame" alpha="0.85" hidden="false" parent="DWMPackBaseFrame" inherits="DWMPackBaseFrame" toplevel="true" enableMouse="true">
    <Size>
      <AbsDimension x="690" y="365" />
    </Size>
    <Anchors>
      <Anchor point="TOPLEFT" relativeTo="DWMPackBaseFrame">
        <Offset>
          <AbsDimension x="27" y="-89" />
        </Offset>
      </Anchor>
Also when creating frames I use a program called WoW UI Designer which is available on this site.
__________________
To give is to receive so the more that you give the more that you receive.
  Reply With Quote
05-28-09, 11:42 AM   #17
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
Originally Posted by Grimsin View Post
i just noticed something very odd.... the absdimensions are different when anchored to the UIparent. IE x used to be 9 for the proper placement its now 0. is the edge of the parent frame not the edge of the screen as my x/y
s were without setting a parentframe?
The 0,0 setting for the parent is to the wow uiparent from center and is normal as far as I know, however you can set the x/y to allow for a spacing from the upper left corner of the screen (uiparent)
__________________
To give is to receive so the more that you give the more that you receive.
  Reply With Quote
05-28-09, 11:47 AM   #18
Exawatt
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Feb 2009
Posts: 36
Originally Posted by Samsan View Post
[...] there is an error in the xml which will prevent it from showing. If you use a mod like swatter, it will display any errors for you.
I believe XML is processed before Swatter is loaded. It shows run-time Lua errors only. If you want to check for XML errors, the client dumps them into a log file located at "..\World of Warcraft\Logs\FrameXML.log".

Originally Posted by Grimsin View Post
Here is the code. it shows nothing
Output from FrameXML.log:
Code:
5/28 13:30:13.663  Frame GrimUIcoreArtB1: Unknown frame level: 0
Remove 'frameLevel="0"' from the <Frame> tag and your frame will display. If you're still not seeing it, then the problem is with your backdrop's bgfile ("interface\AddOns\GrimUIcore\Art\Bottom1").

Last edited by Exawatt : 05-28-09 at 11:50 AM.
  Reply With Quote
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
05-28-09, 11:52 AM   #20
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
thx...I'm still learning myself...not sure about many things still

In your code, the 6 background images are on the base frame from what I can tell, buut are set up strange to me...lol..and the rest of the stuff is placed on top as normal...give me a few and i'll look into it a bit further.

The image setup I use for a base frame is as follows and the rest of the stuff is layered on that. Although I have a base frame and layered frames on top of that...Hope this helps out...

Code:
      <Frame name="DWMBgTexture6" >
        <Size>
          <AbsDimension x="256" y="256" />
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="512" y="-256" />
            </Offset>
          </Anchor>
        </Anchors>
        <Layers>
          <Layer>
            <Texture name="$parentTexture6" setAllPoints="true" file="interface\AddOns\DWMPack\Backs\DWM-Base-Bg-BottomRight">
              <TexCoords left="0" right="1" top="0" bottom="1" />
            </Texture>
          </Layer>
        </Layers>
      </Frame>
      <Frame name="DWMBgTexture5">
        <Size>
          <AbsDimension x="256" y="256" />
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="256" y="-256" />
            </Offset>
          </Anchor>
        </Anchors>
        <Layers>
          <Layer>
            <Texture name="$parentTexture5" setAllPoints="true" file="interface\AddOns\DWMPack\Backs\DWM-Base-Bg-BottomMid">
              <TexCoords left="0" right="1" top="0" bottom="1" />
            </Texture>
          </Layer>
        </Layers>
      </Frame>
      <Frame name="DWMBgTexture4">
        <Size>
          <AbsDimension x="256" y="256" />
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="0" y="-256" />
            </Offset>
          </Anchor>
        </Anchors>
        <Layers>
          <Layer>
            <Texture name="$parentTexture4" setAllPoints="true" file="interface\AddOns\DWMPack\Backs\DWM-Base-Bg-BottomLeft">
              <TexCoords left="0" right="1" top="0" bottom="1" />
            </Texture>
          </Layer>
        </Layers>
      </Frame>
      <Frame name="DWMBgTexture3">
        <Size>
          <AbsDimension x="256" y="256" />
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="512" y="0" />
            </Offset>
          </Anchor>
        </Anchors>
        <Layers>
          <Layer>
            <Texture name="$parentTexture3" setAllPoints="true" file="interface\AddOns\DWMPack\Backs\DWM-Base-Bg-TopRight">
              <TexCoords left="0" right="1" top="0" bottom="1" />
            </Texture>
          </Layer>
        </Layers>
      </Frame>
      <Frame name="DWMBgTexture2">
        <Size>
          <AbsDimension x="256" y="256" />
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="256" y="0" />
            </Offset>
          </Anchor>
        </Anchors>
        <Layers>
          <Layer>
            <Texture name="$parentTexture2" setAllPoints="true" file="interface\AddOns\DWMPack\Backs\DWM-Base-Bg-TopMid">
              <TexCoords left="0" right="1" top="0" bottom="1" />
            </Texture>
          </Layer>
        </Layers>
      </Frame>
      <Frame name="DWMBgTexture1">
        <Size>
          <AbsDimension x="256" y="256" />
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="0" y="0" />
            </Offset>
          </Anchor>
        </Anchors>
        <Layers>
          <Layer>
            <Texture name="$parentTexture1" setAllPoints="true" file="interface\AddOns\DWMPack\Backs\DWM-Base-Bg-TopLeft">
              <TexCoords left="0" right="1" top="0" bottom="1" />
            </Texture>
          </Layer>
        </Layers>
      </Frame>
    </Frames>
__________________
To give is to receive so the more that you give the more that you receive.

Last edited by Samsan : 05-28-09 at 12:09 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » UI not hiding when its supposed to.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off