Thread Tools Display Modes
11-14-05, 11:16 AM   #1
Czarownik
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 8
Textures' SetTexture()

When adding a texture in WoWuides, the texture is added within a "<Frame...". The problem with that is, that from within WoW, I can't call SetTexture() to change the texture in-game, since the texture itself does not have "NAME" property, only the added "<Frame..." has the name. Currently I have to modify the XML form, to add the "name=" property within the "<Texture " tag, in order to be able to modify the texture within game.
  Reply With Quote
11-14-05, 04:14 PM   #2
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
The latest beta at http://wowuides.wowinterface.com/beta.html has this fixed, with the texture named $parentTexture. Just install this, open the form, and resave it, and it will be named properly.
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote
02-25-06, 01:45 PM   #3
JuniorMorgan
A Kobold Labourer
Join Date: Feb 2006
Posts: 1
Not Fixed

The Texture name is still not working.
The designer even takes it away (if you added it in manually) if you resave the form.
Using version 1.0.200.0

Therefore:
In order to us SetTexture()
Right now you must edit the XML manually and add the attribute
Code:
<Texture name="$parentTexture"...
And then in your LUA functions SetTexture will work like this
Code:
MyCoolAddonFormTexture1Texture:SetTexture(sTex);
Where colors represent:
Form
Frame created to hold texture
Name entered manually
  Reply With Quote
02-25-06, 02:32 PM   #4
Czarownik
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 8
It works for me (worked ever since the release of the beta that fixes that issue).

I don't need to edit the XML file manually.
Create new project (main form name MyAddonForm);
Add texture (named $parentTexture1)

To modify the texture in game:

MyAddonFormTexture1Texture:SetTexture("interface\\battlefieldframe\\ui-battlefield-icon")

Perhaps the nightly build (1.0.200.4) addresses that issue.

-cz
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Textures' SetTexture()


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