You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot v4.2.1.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) HD Graphics (Intel Corporation; 20.19.15.4835) - Intel(R) Pentium(R) CPU G3258 @ 3.20GHz (2 Threads)
Issue description
A TextureButton has several texture slots, including Normal, Pressed, Hover, and Click Mask.
It looks like the texture scaling options (e.g. "Keep Aspect Covered") only work correctly for the Click Mask if there is another texture slot filled with a texture, AND if that slot is currently being used.
For example, if you only put a texture into Hover and Click Mask, then the Click Mask texture will be incorrectly scaled until the mouse enters the (incorrect) Click Mask area, at which point the Hover texture gets enabled, and the Click Mask is then scaled correctly. This potentially results in the mouse now being outside the clickable area, in which case the hover state will flicker rapidly between entered and exited as you move the mouse around.
If you have a button with a Normal texture, then the Click Mask is always scaled correctly, so the issue doesn't occur:
Steps to reproduce
No scripting required.
Create a TextureButton with a Hover texture and a Click Mask bitmap. Set the scaling options to ignore texture size, and keep aspect covered. The click mask will only be scaled correctly when the button is in the hovered state.
See MRP - there are two TextureButtons which are identical - the only difference between them is that the top one has a Normal texture, so its click mask is always scaled correctly. The second button does not, and so the click mask is not scaled correctly. If you copy and paste the normal texture from the top button to the bottom button then it will start working correctly.
Tested versions
Found in v4.2.1.stable.mono.official [b09f793]
System information
Godot v4.2.1.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) HD Graphics (Intel Corporation; 20.19.15.4835) - Intel(R) Pentium(R) CPU G3258 @ 3.20GHz (2 Threads)
Issue description
A TextureButton has several texture slots, including Normal, Pressed, Hover, and Click Mask.
It looks like the texture scaling options (e.g. "Keep Aspect Covered") only work correctly for the Click Mask if there is another texture slot filled with a texture, AND if that slot is currently being used.
For example, if you only put a texture into Hover and Click Mask, then the Click Mask texture will be incorrectly scaled until the mouse enters the (incorrect) Click Mask area, at which point the Hover texture gets enabled, and the Click Mask is then scaled correctly. This potentially results in the mouse now being outside the clickable area, in which case the hover state will flicker rapidly between entered and exited as you move the mouse around.
If you have a button with a Normal texture, then the Click Mask is always scaled correctly, so the issue doesn't occur:
Steps to reproduce
No scripting required.
Create a TextureButton with a Hover texture and a Click Mask bitmap. Set the scaling options to ignore texture size, and keep aspect covered. The click mask will only be scaled correctly when the button is in the hovered state.
See MRP - there are two TextureButtons which are identical - the only difference between them is that the top one has a Normal texture, so its click mask is always scaled correctly. The second button does not, and so the click mask is not scaled correctly. If you copy and paste the normal texture from the top button to the bottom button then it will start working correctly.
Minimal reproduction project (MRP)
Click mask minimal.zip
The text was updated successfully, but these errors were encountered: