Portrait options
Hi,
I'm trying to place the 3d Portrait into a round border (square peg in round hole). Since I could not find any easy way to do this, I thought maybe I could change the z-axis, to zoom out, so that my PlayerModel isn't "cut off" into a square. So, I found all of these options for PlayerModel: http://wowprogramming.com/docs/widgets/PlayerModel Problem is, I can only get one of them to actually work. I can turn myself red, but nothing else: Code:
self.Portrait = CreateFrame("PlayerModel", nil, self.Container) Am I missing something obvious? Thanks. |
The portrait element in oUF sets some default values for model scale and position when the portrait is updated.
If you want different values then you either need to provide a self.Portrait.PostUpdate function (make changes after the default update) or a self.Portrait.Override function (replace the default update). |
You probably have to use a self.Portrait.Override function and put your own values in it.
Edit: to slow ... :) |
Ah so that's why all of you have PostUpdate on everything... thanks for the advice, once again!
Is there directly an option to make it round? |
Quote:
|
Models are kinda buggy currently. A quick trick to workaround stuff is doing this in your post-update:
Code:
element:SetAlpha(.51) -- this can be anything which isn't what :GetAlpha() currently is. (element:SetAlpha(element:GetAlpha() + .01) would also work. [1] Everything on the PlayerModel that is, not everything general. |
Quote:
** I've not tried doing this, so it may not be a workable solution ** |
Since WHEN is masking portraits possible?
Are you kidding me. If that would be possible I would go rooftop right now because that would fix my square model of fog animations do not fit into round orb problem. Prove? Afaik that is not possible. |
Quote:
|
I could never get a mask to work on anything but the minimap Yj... which is a shame because it would make many more designs possible.
In case anyone else wants to stick a square peg in a round hole, here's what I did. At the beginning of the file, (after OnInitialize, but before your other functions): Code:
local Portrait_PostUpdate = function(Portrait, unit) Code:
self.Portrait:SetPoint("LEFT", YourAnchorframe, "LEFT", 12, 0) |
All times are GMT -6. The time now is 12:45 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI