PDA

View Full Version : Problem with button tool


cgirolet
09-17-2005, 12:08 PM
Hello

I would like to use the button tool to make a button. where the differents state of the button are made from PNG files. All is well when PNG are 100% opaque (except the transparency around the button of course). but if I want to make a button where the differents states are made from PNG with varying transparency this doesn't work.

Claude

yosik
09-17-2005, 01:56 PM
You are right!!
Strange that no one (including me....) has signaled this, as it occurred also in ver5.

The workaround is to use two images and actions which toogle between them in the onEnter and onLeave events.

Yossi

cgirolet
09-17-2005, 02:02 PM
thanks for the workaround i will try that, a better way would be to correct this in a future update, knowing how cool people at indigorose are they will surely do that, at least i hope so.

claude

Corey
09-17-2005, 02:31 PM
Hi, actually it does work. I've made lots of buttons with different degrees of opacity in the various states. What is the specific problem you're having? Is it possible you just need to adjust your Hit Threshold?

cgirolet
09-17-2005, 02:57 PM
Hi, actually it does work. I've made lots of buttons with different degrees of opacity in the various states. What is the specific problem you're having? Is it possible you just need to adjust your Hit Threshold?

Hi Corey how would i send you a screen capture of my button and of the obtained result in order for you to see what's happening if you want i can also send you the three png files used for the differents states

cgirolet
09-17-2005, 03:00 PM
i didn't touched the hit thresold by the way

Corey
09-17-2005, 03:04 PM
Hi, a screencap of your button wouldn't really help, if you could describe the details of the problem you are having... At any rate I'm %99.9 sure that you just need to adjust the "Hit Threshold" in the button maker, check it out, it's easy to figure out. :yes

yosik
09-17-2005, 03:13 PM
You are ABSOLUTELY right, Corey. Threshold value is the key.
In my mind, I saw that value as defining the hit area of the button, not the actual transparency behaviour. I don't know where the misunderstanding is, but I am glad that this functionality does work.
Thanks!

Yossi

cgirolet
09-17-2005, 03:14 PM
you were right Corey the solution was to set the hit thresold to -1 instead of it's default value of 200

Corey
09-17-2005, 03:20 PM
Cool beans guys, I'm just glad you got your buttons working the way you want them to. :)

cgirolet
09-17-2005, 03:30 PM
the drawback is that these buttons are now seen as square no matter their shape, i mean the mouse cursor is changed as soon as the mouse is entering in the button zone, with the default thresold the mouse cursor changed depending on the button shape, but we lost the varrying transparency, is there a thresold that would combine the advantages of both

Corey
09-17-2005, 03:31 PM
Hi. Yes there is, just experiment with the Hit Threshold value until you find the right balance. :)

cgirolet
09-17-2005, 03:48 PM
Hi. Yes there is, just experiment with the Hit Threshold value until you find the right balance. :)


Yep i found it, the right value seems to be 128.

Corey
09-17-2005, 03:54 PM
Sweet. :) :yes