Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-26-18, 02:25 AM   #1
saxitoxin
A Theradrim Guardian
 
saxitoxin's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 60
using both :SetTexCoord and :SetRotation()

Hi!

I'm trying as the title says to use both :SetTexCoord and :SetRotation() on the same texture


Lua Code:
  1. CREATING FRAMES AND STUFF UP HERE
  2.  
  3. mainFrame.icon = mainFrame:CreateTexture(nil,"OVERLAY",nil,-8)
  4. mainFrame.icon:SetPoint("CENTER")
  5. mainFrame.icon:SetSize(mainFrame:GetWidth()*iconScale, mainFrame:GetWidth()*iconScale)
  6. mainFrame.icon:SetTexture(unpack(cfg.SXwpClassInfo[cfg.classNumber]))
  7.  
  8. mainFrame.icon:SetTexCoord(unpack(cfg.SXwpClassInfoTexCoord[cfg.classNumber]))
  9. mainFrame.icon:SetRotation(math.rad(0))

what I try to do with this code is to first set the coord for the bottom left emblem on THIS image, then I want to rotate it based on a slidervalue (set longer down in the code), but if I use the mainFrame.icon:SetRotation(math.rad(0)) command the image show uncropped

Any way to fix this without using animGroup and rotate
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » using both :SetTexCoord and :SetRotation()

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