View Single Post
05-16-17, 07:50 PM   #1
Baggyman
A Deviate Faerie Dragon
Join Date: Jan 2016
Posts: 12
TidyPlates Totem Widget

Hey, I am trying to move the "artwork" icon for the TidyPlates Totem Widget. I've tried editing pretty much everything in the below block of code from the lua file, but have not been able to figure it out. I am able to move the overlay just fine, but anytime I try to move the icon either the icon just doesn't move or doesn't show up after the edit.

Specifically I've tried changing the line
frame.Icon:SetPoint("CENTER",frame) to
frame.Icon:SetPoint("CENTER",frame, 1, 20) but that doesn't move the icon, and to frame.Icon:SetPoint("TOP",frame) but that just makes the icon disappear

Any ideas? Really appreciate any help!


Lua Code:
  1. local function CreateTotemIconWidget(parent)
  2.     local frame = CreateFrame("Frame", nil, parent)
  3.     frame:SetWidth(50); frame:SetHeight(50)
  4.  
  5.     frame.Overlay = frame:CreateTexture(nil, "OVERLAY")
  6.     frame.Overlay:SetPoint("CENTER",frame, 1, -1)
  7.     frame.Overlay:SetWidth(20); frame.Overlay:SetHeight(20)
  8.     frame.Overlay:SetTexture(classWidgetPath.."BORDER")
  9.     --frame.Overlay:SetAllPoints(frame)
  10.  
  11.     frame.Icon = frame:CreateTexture(nil, "ARTWORK")
  12.     frame.Icon:SetPoint("CENTER",frame)
  13.     frame.Icon:SetTexCoord(.07, 1-.07, .07, 1-.07)  -- obj:SetTexCoord(left,right,top,bottom)
  14.     --frame.Icon:SetWidth(46); frame.Icon:SetHeight(47)
  15.     frame.Icon:SetAllPoints(frame)
  16.  
  17.     frame:Hide()
  18.     frame.Update = UpdateTotemIconWidget
  19.     return frame
  20. end

Last edited by Baggyman : 05-16-17 at 07:59 PM.
  Reply With Quote