Thread Tools Display Modes
03-03-14, 11:41 PM   #21
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
The following code will never display a texture as long as "SetNonBlocking" is enabled unless the texture is loaded elsewhere.
Lua Code:
  1. local tx = UIParent:CreateTexture()
  2. tx:SetPoint('CENTER')
  3. tx:SetSize(64, 64)
  4. tx:SetNonBlocking(true)
  5.  
  6. local switch = true
  7. local texture1, texture2 = 'interface/icons/inv_mushroom_10', 'interface/icons/inv_mushroom_11'
  8. CreateFrame('frame'):SetScript('OnUpdate', function()
  9.     tx:SetTexture(switch and texture1 or texture2)
  10.     switch = not switch
  11. end)
If you use a single texture it will load but switching between two textures every other frame appears to prevent it from ever completing the loading process.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » :SetTexture() only works for abilities on actionbar.

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