Welcome, Guest

Author Topic: Specify a color to not pass through  (Read 1544 times)

jdboivin

  • Posts: 2
    • View Profile
Specify a color to not pass through
« on: September 11, 2015, 12:25:42 PM »
When using the ClickThroughAlphaThreshold property set to 0 you can't click text button with fully transparent background without having to click on the glyph themselves (and you can actually pass trough inside an "O" for example if it is big enough) since it look for the actual pixel value on the texture.

This is a problem we are currently facing and it seems like a quick solution would be to allow to add an option to specify a color that shouldn't pass through, like says rgba(255, 0, 0, 0), this way a fully transparent but green pixel would catch the click?

Or is there another solution to allow text button with wide padding and fully transparent background to catch the click?

John

  • Coherent Labs support
  • Administrator
  • *****
  • Posts: 205
    • View Profile
Re: Specify a color to not pass through
« Reply #1 on: September 12, 2015, 02:21:49 AM »
Hello jdboivin,

Currently we do not support such a feature, but we will consider it. There is an easy workaround for it, that is also relatively safe. Create a page with the lowest possible Alpha value above 0 (1/255 or ~0.004 in my test), set the ClickThroughAlphaThreshold to 0.0 and the click should be caught. Such levels of non-transparency are invisible for the eye, but visible to the program.

You can try loading the file I am attaching in UE4 and testing with it.

Regards,
John

jdboivin

  • Posts: 2
    • View Profile
Re: Specify a color to not pass through
« Reply #2 on: September 12, 2015, 07:18:13 AM »
Thanks, that's exactly what I was doing. Just wasn't sure if that was the right way to do it.

Tags: