Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-08-15, 04:05 PM   #1
chanceboon
A Murloc Raider
Join Date: Oct 2015
Posts: 5
Only works on a reload

This small sample of code is just a small experiment to pull the protrait. It works, but requires a reload of the ui...First load shows nothing, but it shows up if I reload the UI...

Lua Code:
  1. local myFrame = CreateFrame("Frame","Frame_Name",UIParent,"ButtonFrameTemplate")
  2.     myFrame:SetSize(255,200)
  3.     myFrame:ClearAllPoints()
  4.     myFrame:SetPoint("LEFT",75,75)
  5.     myFrame:EnableMouse(true)
  6.     myFrame:SetMovable(true)
  7.     myFrame:RegisterForDrag("LeftButton")
  8.     myFrame:SetScript("OnDragStart",myFrame.StartMoving)
  9.     myFrame:SetScript("OnDragStop",myFrame.StopMovingOrSizing)
  10.  
  11. local img1 = myFrame:CreateTexture(nil, "ARTWORK")
  12.     SetPortraitTexture(img1, "player")
  13.     img1:SetHeight(60)
  14.     img1:SetWidth(60)
  15.     img1:SetPoint("TOPLEFT", -6, 8)

I'm not at all sure...any ideas?
  Reply With Quote
 

WoWInterface » Developer Discussions » Graphics Help » Only works on a reload

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