MaskTexture : new widget for 7.2
Hello there.
It seems that 7.2 introduced a new widget type who seems to inherrit from Texture : MaskTexture. As im not really a procoder, im not able to know how to exploit it correctly, but i know that Frame:CreateMaskTexure() exists. Well i would like to know if someone got infos or anything, because it is potentially a very interesting feature. Do someone know how sites like wowpedia or wowapi can know the existence of this things ? Thanks. |
Used in the artifact power button template:
Code:
<Layer level="OVERLAY" textureSubLevel="2"> The file TempPortraitAlphaMask is just a white circle on transparent background presumably used for creating an overlay mask. I don't use the default artifact power bar so garner from that what you will. |
Thank you very much for this informations, good to know.
How do you find this files ? im not able to locate them even with CASCexplorer |
Isn't this equivalent to
Lua Code:
Curious about the wrap mode, though. Iirc, providing the means of using custom, non-native textures as masks for other things than the minimap was on the to-do list. |
That made me remember TheDanW mentioned some stuff about it
https://www.townlong-yak.com/framexm...on.xml/diff#15 https://www.townlong-yak.com/framexm...I.xsd/diff#514 http://infobot.rikers.org/%23wowuidev/20170117.html.gz http://infobot.rikers.org/%23wowuidev/20170118.html.gz Quote:
|
Quote:
|
For me personally, this is a great change. I was expecting texture masking to be reworked at some point, because it sporadically causes 'script ran too long' errors in combat when applying new textures to an already masked entity.
I had to essentially create four different textures for each modifier state in use and manipulate their alpha values (hiding / showing textures causes them to be redrawn), and overlay them on my controller action bars, just to minimise the amount of frame rate drops and sporadic errors due to an icon change in combat. I can probably remove all the code I wrote to circumvent this issue. While round action buttons were entirely possible before, this could also allow for some pretty interesting shapes and techniques for UI designers that were not possible previously. :) |
Quote:
|
This sounds awesome.
|
Any idea how to set the child keys in pure Lua? Doesn't seem to have a function for it.
|
Code:
frame:CreateMaskTexture("Name", "Texture", childKey) I'm not sure how using this it can be set for more than childKey texture. There don't seem to be any WrapMode methods or they're called something else completely. |
All Texture objects now have texture:AddMaskTexture(mask) and texture:RemoveMaskTexture(mask) methods.
Moreover, texture:SetTexture(...) received some upgrades, 2nd and 3rd args can be used to set hWrapMode and vWrapMode. Quote:
Lua Code:
IIRC, each texture can have upto 3 masks applied. Sadly, it can't be used w/ statusbar:GetStatusBarTexture(), that's kinda StatusBar bug, the only workaround is to make real status bar texture transparent and create your own texture to replace it. There's some bugs w/ MaskTextures too, for instance, if you're using mask textures w/ SmoothStatusBar mixin or oUF_Smooth or any sort of status bar "smoothing" technique, it'll take some time till mask is reapplied. I already reported this bug w/ sample code and stuff... Dan said that he kinda found the reason why it's happening, so it should be fixed in next PTR build, probably, I'll ask him today... Said bug in action o_O There's a way to crash client by passing "bad" args to frame:CreateMaskTexture(...), but I also reported this issue. And Infus reported some other bug, I don't remember what T_T |
I've implemented this feature into the next version of Masque, but only for the Icon layer. This should allow skin authors to make better circular skins. I suppose you could make any shape you wanted, but you'd have to create your own spell alerts, etc. The basic circular one I did was a pain in the ass and I really can't be bothered to make more. :p
I'm not going to bother implementing it for the other layers because those are usually custom textures anyhow and authors should utilize the alpha channel rather than a mask. That is, unless animated masks turn out to be an easily-implemented and interesting prospect. As for the masks themselves, from what I can tell the engine uses the alpha channel of the texture so the RGB values shouldn't matter. In many cases, skins that use the same "overlay" texture for the flash, pushed, etc, can simply use that texture's alpha as the mask for the icon. |
If anyone wants to make circular action buttons, I recommend using this texture as mask instead of the portrait mask traditionally used by the UI for circular masks.
Code:
Interface\Minimap\UI-Minimap-Background |
You can use your own texture as a mask too o_O
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
All times are GMT -6. The time now is 12:39 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI