Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

Texture Slicing's Behavior Changed In 10.2.7 #547

Open Peterodox opened 2 months ago

Peterodox commented 2 months ago

This is a request to add a method to control the size of each tile in the new Texture Slicing system.

I'll refer to the TextureObject in TextureObject:SetTexture(textureAsset) as Texture and the textureAsset, File.

Texture Slicing is a new system added in 10.2.0. It allows you to use a single Texture to achieve what used to require 9. If you set a File like the one below (64 x 64, 2 px white border) to a Texture using the new Texture Slicing method, the border will remain 2 px as long as the Texture's size on the screen (in pixels) is equal or larger than the File. The border will scale down if it's smaller than the File. It's unaffected by the Texture's parent scale, so I found this convenient for achieving pixel perfect.

Stroke

However, its behavior has changed after 10.2.7: each piece of the Texture will scale up if the Texture's size is larger than the File. As shown in the image below, the border becomes thicker as the frame goes bigger.

TextureSlicePost10_2_7

This seems to be an unintended change: if WoW devs decided to replace the current NineSliceUtil with the new system and apply it to GameTooltip, whose size depends on the content, you would want the border to have a constant size.

WoWScrnShot_041124_134019

It would be nice to have a simple way to control the size of each tile.