Thread Tools Display Modes
09-09-15, 12:28 AM   #1
Nikita S. Doroshenko
A Cyclonian
 
Nikita S. Doroshenko's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2015
Posts: 45
Is there are any way to change Layer's Texture without it's name?

We got simple MerchantRepairItemButton in Blizard MerchantFrame.lua, and this button got Layer with Texture, but without name.

Code:
			<Button name="MerchantRepairItemButton">
				<Size x="36" y="36"/>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="MerchantRepairAllButton" relativePoint="LEFT" x="-2" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="BORDER">
						<Texture file="Interface\MerchantFrame\UI-Merchant-RepairIcons">
							<TexCoords left="0" right="0.28125" top="0" bottom="0.5625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						...
					</OnEnter>
					<OnClick>
						...
					</OnClick>
				</Scripts>
				<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
				<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
			</Button>


I spend a few hours to trying figure out how to change this Texture without knowing it's name, but no luck Maybe someone can help me here. I will very appreciate for your advice.
  Reply With Quote
09-09-15, 02:39 AM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
MerchantRepairItemButton:GetRegions() should give you what you want.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Is there are any way to change Layer's Texture without it's name?


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