Originally Posted by Neza
The interesting part for me here would be if this works on dynamic textures like player portraits and npc portraits.
Most posts i've found said something its not possible.
|
No, those are actually rendered on the spot then applied to a texture with the circle mask. Sadly there is no way to get in between the rendering and masking processes. The closest you could get would be to use a PlayerModel object and use the
SetUnit() method, but that would create an animated model instead of the still portrait you see.
Edit: CharacterMicroButton seems to achieve a rectangular unit portrait by setting texcoords. The following has been found in MainMenuBarMacroButtons.xml.
Code:
<Texture name="MicroButtonPortrait">
<Size>
<AbsDimension x="18" y="25"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-28"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.2" right="0.8" top="0.0666" bottom="0.9"/>
</Texture>