[LUA]Need help making rectangular buttons on masque without stretching the icon
As the title says, I'm trying to create a skin for Masque that makes my action buttons rectangular without having to resort to simply distorting the icon.
This is what I'd like to achieve: I tried used SetTextCoord to try and crop the top and bottom of the button but the texture gets all messed up. See image bellow: This is the part of the code I modified. The rest is from Masque's Zoomed skin: Code:
Icon = { Lua Code:
PS. I know about Masque Ractangle, but as I said, the process it's author used to make the action buttons rectangular was by stretching the icon. I'd rather just crop the top and/or bottom and not distort it. Any ideas how I might accomplish this? I appreciate any help you can give me! |
Let me preface this by saying that I can no longer play World of Warcraft (all I have is an old Acer Iconia A100 tablet) but it seems to me that if you make your icon rectangular, why would you make your Masque skin square?
|
See this documentation:
http://wowprogramming.com/docs/widge...re/SetTexCoord Quote:
Try: 0, 0, 0.25, 0.75 (which will show everything between 0.25 and 0.75, which is half the image) |
It worked, p3lim. It's still a bit distorted but I can mess around with values till I get to where I want. Tyvm!
Edit: For those interested, here's the important part of the code and how it looks: Lua Code:
|
You use a height of 28px which is 70% of 40px
so you can easily change the Top/Bottom part for TexCoords Exact middle would be <left, right, 0.15, 0.85> Example Outputs: --->-----------------<--- = 0.15, 0.85 ->-----------------<----- = 0.05, 0,75 ------>-----------------< = 0.30, 1.00 |
All times are GMT -6. The time now is 10:11 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI