Rollover Buttons

BlitzPlus Forums/BlitzPlus Programming/Rollover Buttons

rogue(Posted 2004) [#1]
I have been looking in the documentation and on the boards for info on creating and using rollover buttons. Basically I want a graphic image with a mask for a button. The button needs to handle the mouse rolling over it and switch to a second image to indicate a rollover state. Then if the user clicks on the button it switches to a third image indicating a down state.

Looking at BlitzPlus this does not seem to be handled. Given that it would need to hook into the event loop (to track the mouse movement onto and off of various buttons), it does not seem to be something that is trival.

I have all of this working in my C++ engine, but the publisher for this game wants to use BlitzPlus for development so I am forced to reinvent the wheel unless there are some routines already working that I can leverage off of.

Which makes me think I should check the code archives, then the add-ins that other people may have written that I could buy a ready made solution for this.


rogue(Posted 2004) [#2]
I coded this up in BlitzPlus. Not too hard, but there is the issue of when I detect the mouse down I do not want to immediately do the appropriate button action because I want the user to see the DOWN state for the button first. I guess I can do this by checking the Millisecond timer and doing the action after 1/2 a second or so to give time to let the user see the down state for the button.

If anyone is interested in the code for the rollover buttons let me know and I will gladly share it with you.

- Ken


WolRon(Posted 2004) [#3]
It can be done with canvas buttons. Is that how you succeeded?


rogue(Posted 2005) [#4]
Don't Canvas buttons require that you are not using the "Graphics" mode and are using a CreateWindow, CreatePanel scenario?

- K