Originally Posted by zork
Texture is irrelevant as long as it is just a string.
I tested SetPortaitTexture. Seems to work as expected. Going to set up a layout now.
*edit*
Ok so the basic stuff is working: http://code.google.com/p/rothui/sour...SquarePortrait
To bad the PTR just went down.
*edit2*
Ok the PTR got up again. Here we go: http://www.wowinterface.com/download...ePortrait.html
So what I'm doing in the layout is. I convert a 3D unit model into a 2D circluar version. After that I use SetTexCoord to get a square version again.
Still some minor issues but the general stuff is in place to grab some ideas. I think the dropshadow function I build is pretty near aswell.
When using preset textures from a media folder stuff gets alot easier though because you can make that texture your statusbar texture.
|
Thanks Zork for the beautiful codes. But I wonder if we could use portrait Override function to handle the portrait conversions.
Code:
--portrait
local portrait = self:CreateTexture(nil, "ARTWORK")
portrait:SetSize(64, 64 )
portrait:SetAllPoints(self)
portrait.Override = UpdatePortrait
self.Portrait = portrait
Code:
local function UpdatePortrait(self, event, unit)
here we slide and dice then return the new portrait
end
Will that work? Gonna try it out when I get home tonite.