Quantcast
Child of a Child? - WoWInterface
Thread Tools Display Modes
06-30-12, 06:52 AM   #1
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Child of a Child?

Hi there.

I'm working on getting my texture pack ready for MOP, and i'm doing alright so far, until i came across this:



In Cata, this Frame was named ReforgingFrameButtonFrame and its first child was that black background which could be changed by .SetTexture.

Now in MOP, they seemingly removed that Frame, so i had to dig deeper.

By Using
Code:
_,_,_,_,_,_,c7,_ = ReforgingFrame:GetChildren();
c7:Hide()
i am able to hide the whole button frame. So my question is if it's possible that the black background is the child of a child of a frame, or if i'm completely mistaken

On a side note: The TransmogrifyFrame uses the same button setup and they haven't changed the coding there :S
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘

Last edited by Miiru : 06-30-12 at 10:21 AM.
  Reply With Quote
06-30-12, 07:05 AM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
I'm working on the reforging frame as well for Aurora, I'll let you know if I find out.

However, you can use functions sequentially. For example, you could use:

Code:
ReforgingFrame:GetChildren():GetChildren()
To find out if it is indeed the 'child of a child'.

I'd also advise digging through the frame's XML to see which texture this is exactly. That's usually easier than going in manually.
  Reply With Quote
06-30-12, 07:14 AM   #3
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
<Layers>
<Layer level="BORDER" textureSubLevel="1">
<Texture>
<Size x="334" y="21"/>
<Anchors>
<Anchor point="BOTTOMLEFT" x="1" y="5"/>
</Anchors>
<Color r="0" g="0" b="0"/>
</Texture>
</Layer>

Pretty sure its this one Line 410 @ AddOns/Blizzard_ReforgingUI/Blizzard_ReforgingUI.xml
  Reply With Quote
06-30-12, 07:14 AM   #4
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Code:
ReforgingFrame.ButtonFrame:GetRegions():Hide()
ReforgingFrame.ButtonFrame.ButtonBorder:Hide()
ReforgingFrame.ButtonFrame.ButtonBottomBorder:Hide()
ReforgingFrame.ButtonFrame.MoneyLeft:Hide()
ReforgingFrame.ButtonFrame.MoneyRight:Hide()
ReforgingFrame.ButtonFrame.MoneyMiddle:Hide()
This cleans up the entire mess at the bottom.

Btw, how do you handle your portraits (top left of frame)? Is there a way to get the circular ones to be square instead, or do you just take a different square texture?
  Reply With Quote
06-30-12, 07:29 AM   #5
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Thanks, that does the trick

For most windows, i use a new square texture, because as far as i know there no way to turn the round icons to square ones.

Some round ones could possibly be exchanged by editing the blizzard files i guess but that won't work for every portrait which is dynamicly loaded like most np's and players.
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘

Last edited by Miiru : 06-30-12 at 10:54 AM.
  Reply With Quote
06-30-12, 12:17 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,745
The only way to turn the round icons to square ones is to call SetTextCoords on the texture and chop off the edges of the circle.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-30-12, 02:49 PM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,928
It depends if the texture itself is round to begin with. A lot of these are set using SetPortraitToTexture(), which applies the image with a circular mask. If this is the case, you can easily get around it by using texture:SetTexture() instead.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
06-30-12, 03:35 PM   #8
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Originally Posted by SDPhantom View Post
It depends if the texture itself is round to begin with. A lot of these are set using SetPortraitToTexture(), which applies the image with a circular mask. If this is the case, you can easily get around it by using texture:SetTexture() instead.

The interesting part for me here would be if this works on dynamic textures like player portraits and npc portraits.

Most posts i've found said something its not possible.
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘
  Reply With Quote
06-30-12, 05:03 PM   #9
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,928
Originally Posted by Neza View Post
The interesting part for me here would be if this works on dynamic textures like player portraits and npc portraits.

Most posts i've found said something its not possible.
No, those are actually rendered on the spot then applied to a texture with the circle mask. Sadly there is no way to get in between the rendering and masking processes. The closest you could get would be to use a PlayerModel object and use the SetUnit() method, but that would create an animated model instead of the still portrait you see.



Edit: CharacterMicroButton seems to achieve a rectangular unit portrait by setting texcoords. The following has been found in MainMenuBarMacroButtons.xml.

Code:
<Texture name="MicroButtonPortrait">
	<Size>
		<AbsDimension x="18" y="25"/>
	</Size>
	<Anchors>
		<Anchor point="TOP">
			<Offset>
				<AbsDimension x="0" y="-28"/>
			</Offset>
		</Anchor>
	</Anchors>
	<TexCoords left="0.2" right="0.8" top="0.0666" bottom="0.9"/>
</Texture>
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 06-30-12 at 05:19 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Child of a Child?

Thread Tools
Display Modes

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