Thread Tools Display Modes
09-25-10, 10:02 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
remove xml border layer texture with lua

Im atempting to remove the border for the new warlock shard frame in cata. Is it possible to remove the border created in the following xml using lua?

xml Code:
  1. <Layer level="ARTWORK">
  2. <Texture file="Interface\PlayerFrame\UI-WarlockShard" parentKey="shardFill">
  3. <Size x="17" y="16"/>
  4. <TexCoords left="0.01562500" right="0.28125000" top="0.00781250" bottom="0.13281250"/>
  5. <Anchors>
  6. <Anchor point="TOPLEFT" x="3" y="-2"/>
  7. </Anchors>
  8. </Texture>
  9. </Layer>
  10. <Layer level="BORDER">
  11. <Texture file="Interface\PlayerFrame\UI-WarlockShard">
  12. <Size x="52" y="29"/>
  13. <TexCoords left="0.01562500" right="0.82812500" top="0.60937500" bottom="0.83593750"/>
  14. <Anchors>
  15. <Anchor point="TOPLEFT" x="-5" y="3"/>
  16. </Anchors>
  17. </Texture>
  18. </Layer>
  19. </Layers>
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-25-10, 10:12 PM   #2
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
What's the parent frame? You could probably access it via frame:GetRegions().
You'd just have to find the right one from the list and :Hide() it.

Example (the list of textures/fontstrings will differ!)
Code:
local texture1, texture2, fontstring1, texture3, ... = MyFrame:GetRegions()
texture3:Hide()
__________________
« Website | GitHub »

Oh hai!

Last edited by xConStruct : 09-25-10 at 10:14 PM.
  Reply With Quote
09-25-10, 11:15 PM   #3
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
the parent frame is... ShardBarFrameShard1
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-26-10, 07:54 AM   #4
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
this is the whole file. Problem is bliz used "parent key" for a bunch of it but didnt do it for that part. You tell me what the parent is lol.

xml Code:
  1. <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/
  2. ..\FrameXML\UI.xsd">
  3.   <Script file="ShardBar.lua"/>
  4.  
  5.  
  6. <!-- Patchwerk texture info size=64,128
  7. <Texture name="UI-WarlockShard-Shard.png" >
  8. <Size x="17" y="16"/>
  9. <TexCoords left="0.01562500" right="0.28125000" top="0.00781250" bottom="0.13281250"/>
  10. </Texture>
  11. <Texture name="UI-WarlockShard-ShardGlow.png" >
  12. <Size x="26" y="23"/>
  13. <TexCoords left="0.01562500" right="0.42187500" top="0.14843750" bottom="0.32812500"/>
  14. </Texture>
  15. <Texture name="UI-WarlockShard-Smoke.png" >
  16. <Size x="32" y="32"/>
  17. <TexCoords left="0.01562500" right="0.51562500" top="0.34375000" bottom="0.59375000"/>
  18. </Texture>
  19. <Texture name="UI-WarlockShard-BG.png" >
  20. <Size x="52" y="29"/>
  21. <TexCoords left="0.01562500" right="0.82812500" top="0.60937500" bottom="0.83593750"/>
  22. Interface\\PlayerFrame\\
  23. </Texture-->
  24.  
  25.  
  26.  
  27.  
  28.  
  29.   <Frame name="ShardTemplate" virtual="true" hidden="false">
  30. <Size x="52" y="29"/>
  31.     <Layers>
  32. <Layer level="OVERLAY">
  33. <Texture file="Interface\PlayerFrame\UI-WarlockShard" parentKey="shardGlow" alphaMode="ADD" hidden="true">
  34. <Size x="26" y="23"/>
  35. <TexCoords left="0.01562500" right="0.42187500" top="0.14843750" bottom="0.32812500"/>
  36. <Anchors>
  37. <Anchor point="TOPLEFT" x="-2" y="1"/>
  38. </Anchors>
  39. </Texture>
  40. <Texture name="$parentSmoke" file="Interface\PlayerFrame\UI-WarlockShard" parentKey="shardSmoke1">
  41. <Size x="32" y="32"/>
  42. <TexCoords left="0.01562500" right="0.51562500" top="0.34375000" bottom="0.59375000"/>
  43. <Anchors>
  44. <Anchor point="TOPLEFT" x="-8" y="5"/>
  45. </Anchors>
  46. <Animations>
  47. <AnimationGroup parentKey="animUsed">
  48. <Alpha change="1" duration="0.1" order="1"/>
  49. <Rotation radians="1.1" duration="0.3" order="1"/>
  50. <Scale scaleX="1.2" scaleY="1.8" duration="0.3" order="1"/>
  51. <Alpha change="-1" duration="0.25" order="2"/>
  52. <Scale scaleX="0.4" scaleY="0.4" duration="0.3" order="2"/>
  53. </AnimationGroup>
  54. </Animations>
  55. </Texture>
  56. <Texture file="Interface\PlayerFrame\UI-WarlockShard" parentKey="shardSmoke2">
  57. <Size x="32" y="32"/>
  58. <TexCoords right="0.01562500" left="0.51562500" bottom="0.34375000" top="0.59375000"/>
  59. <Anchors>
  60. <Anchor point="TOPLEFT" relativeTo="$parentSmoke"/>
  61. </Anchors>
  62. <Animations>
  63. <AnimationGroup parentKey="animUsed">
  64. <Alpha change="1" duration="0.1" order="1"/>
  65. <Rotation radians="-0.9" duration="0.4" order="1"/>
  66. <Scale scaleX="2.5" scaleY="2.5" duration="0.4" order="1"/>
  67. <Alpha change="-1" duration="0.25" order="2"/>
  68. <Scale scaleX="0.4" scaleY="0.4" duration="0.25" order="2"/>
  69. </AnimationGroup>
  70. </Animations>
  71. </Texture>
  72. </Layer>
  73. <Layer level="ARTWORK">
  74. <Texture file="Interface\PlayerFrame\UI-WarlockShard" parentKey="shardFill">
  75. <Size x="17" y="16"/>
  76. <TexCoords left="0.01562500" right="0.28125000" top="0.00781250" bottom="0.13281250"/>
  77. <Anchors>
  78. <Anchor point="TOPLEFT" x="3" y="-2"/>
  79. </Anchors>
  80. </Texture>
  81. </Layer>
  82. <Layer level="BORDER">
  83. <Texture file="Interface\PlayerFrame\UI-WarlockShard">
  84. <Size x="52" y="29"/>
  85. <TexCoords left="0.01562500" right="0.82812500" top="0.60937500" bottom="0.83593750"/>
  86. <Anchors>
  87. <Anchor point="TOPLEFT" x="-5" y="3"/>
  88. </Anchors>
  89. </Texture>
  90. </Layer>
  91. </Layers>
  92.   </Frame>
  93.  
  94. <Frame name="ShardBarFrame" parent="PlayerFrame" frameStrata="LOW" toplevel="true" hidden="false">
  95. <Size>
  96. <AbsDimension x="110" y="25"/>
  97. </Size>
  98. <Anchors>
  99. <Anchor point="TOP" relativeTo="PlayerFrame" relativePoint="BOTTOM">
  100. <Offset>
  101. <AbsDimension x="50" y="34"/>
  102. </Offset>
  103. </Anchor>
  104. </Anchors>
  105. <Frames>
  106. <Frame name="$parentShard1" inherits="ShardTemplate" parentKey="shard1">
  107. <Anchors>
  108. <Anchor point="TOPLEFT"/>
  109. </Anchors>
  110. </Frame>
  111. <Frame name="$parentShard2" inherits="ShardTemplate" parentKey="shard2">
  112. <Anchors>
  113. <Anchor point="TOPLEFT" relativeTo="$parentShard1" relativePoint="TOPLEFT" x="35"/>
  114. </Anchors>
  115. </Frame>
  116. <Frame name="$parentShard3" inherits="ShardTemplate" parentKey="shard3">
  117. <Anchors>
  118. <Anchor point="TOPLEFT" relativeTo="$parentShard2" relativePoint="TOPLEFT" x="35"/>
  119. </Anchors>
  120. </Frame>
  121. </Frames>
  122. <Animations>
  123. <AnimationGroup parentKey="showAnim">
  124. <Alpha change="1" duration="0.5" order="1"/>
  125. <Scripts>
  126. <OnFinished>
  127. self:GetParent():SetAlpha(1.0);
  128. </OnFinished>
  129. </Scripts>
  130. </AnimationGroup>
  131. </Animations>
  132. <Scripts>
  133. <OnLoad function="ShardBar_OnLoad"/>
  134. <OnEvent function="ShardBar_OnEvent"/>
  135. </Scripts>
  136. </Frame>
  137. </Ui>
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-26-10, 08:18 AM   #5
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
Isn't ShardBarFrame the frame you're looking for ?
  Reply With Quote
09-26-10, 09:16 AM   #6
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
yes and no... i want to hide JUST the shard boarders on the shardbarframe. if you hide shardbarframe it hides all of it. i need the texture name of the border. unfortunately it looks like somehow bliz did this without naming the border.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-26-10, 09:37 AM   #7
grom
A Deviate Faerie Dragon
Join Date: Jun 2006
Posts: 17
did you look into ShardBar.lua?
  Reply With Quote
09-26-10, 09:48 AM   #8
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
i did, nothing there either
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-26-10, 10:15 AM   #9
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
Yep, the texture isn't named or stored in the frame-table. (ShardBarFrameShard1, ShardBarFrameShard2, ShardBarFrameShard3 are the parents)

As I said, look through ShardBarFrameShard1:GetRegions() to find the right texture and then :Hide() this one.
If I had a warlock, I would test it for you :/

You can try this ingame:
Code:
/script select(1, ShardBarFrameShard1:GetRegions()):Hide()
Then change the first number until you find the right texture. If it errors out, there are no textures left
__________________
« Website | GitHub »

Oh hai!

Last edited by xConStruct : 09-26-10 at 10:20 AM.
  Reply With Quote
09-26-10, 10:29 AM   #10
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
I'd be happy to take a look, but there's a queue. And when it got to be my turn I disconnected. :/ Will try again later if you haven't figured it out.
__________________
Oh, the simulated horror!
  Reply With Quote
09-26-10, 10:34 AM   #11
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Okay, well i found it. Now i still dont know the name lol. It is texture number 5 using the in game script you provided. Which i figured, at the begining of that xml file it lists 5 texture paths and the BG is the 5th. Stood to reason that it would be the 5th texture so that was easy but now how do i make it tell me what that is called or can i modify that script to run in lua and just hide layer region 5 somehow?

could i simply put select(5, ShardBarFrameShard1:GetRegions()):Hide() in my lua?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-26-10, 10:35 AM   #12
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Originally Posted by Ailae View Post
I'd be happy to take a look, but there's a queue. And when it got to be my turn I disconnected. :/ Will try again later if you haven't figured it out.
a queue? for beta? i got in right now no problem.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-26-10, 10:36 AM   #13
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
Originally Posted by Grimsin View Post
could i simply put select(5, ShardBarFrameShard1:GetRegions()):Hide() in my lua?
Yes, you can
__________________
« Website | GitHub »

Oh hai!
  Reply With Quote
09-26-10, 11:06 AM   #14
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Sweet almost ready for a cata release of the ui.

__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-26-10, 11:51 AM   #15
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Just to clarify something, frames and textures do not need to have names, or their references can be local variables (if created in Lua). That's when you need to use GetRegions().
__________________
"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

WoWInterface » Developer Discussions » Lua/XML Help » remove xml border layer texture with lua


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