garrysmod icon indicating copy to clipboard operation
garrysmod copied to clipboard

UV support for killicons

Open AwfulRanger opened this issue 9 years ago • 3 comments

As far as I know, something like this is necessary to use TF2 killicons without extracting and modifying them, due to the way they're stored in a big image.

This might not be the best way to do it though, but it does work.

AwfulRanger avatar Apr 19 '16 02:04 AwfulRanger

Yeah, sorry, using x/y/w/h as names for UV coords was an old habit of mine. It's a bit unclear to me though if you want me to change the values to pixels or change the argument names.

If you'd rather have it use pixel values instead of changing the argument names, maybe the function should be renamed as well?

AwfulRanger avatar May 26 '20 13:05 AwfulRanger

I don't see any reason for the function to take UV coordinates over pixel values. You open the texture in a image editing program, select the rectangle you want and copy/paste the pixel values.

I think the name is fine, unless you have a better name for it. As for the surface.GetTextureSize issue, I have added info about .png materials to its wiki page that should help you.

robotboy655 avatar May 29 '20 14:05 robotboy655

PR is awaiting approval. What is missing for the merging?

GitSparTV avatar Oct 02 '20 16:10 GitSparTV