Change label/buttongraphic when mouse over GUI button (SOLVED)

Started by InCreator, Thu 22/11/2007 09:11:26

Previous topic - Next topic

InCreator

Title says it all.

I want to make some button onto my gui, and little help (not AGS text, but on a image) to change whenever mouse is over button.

For example, there's a disk shaped button, and when mouse is over it, a text "click here to save your game" appears.

How do I do it? Browsing help didn't help much.
I know how to change button graphics/label text, but can't figure out what the function is, to determine if mouse is over particular button or not.

I'm using older AGS, not 3.0

Buckethead

I must be missing something here because isn't there just a "Mouseover image" function in the gui editor?  ???

Ashen

Indded, there's the Button.MouseOverGraphic (settable in the editor) that should take care of that automatically.
However, it sounds like you want to change a different Button's graphic, depending on where the mouse is (e.g. if it's over btnSave, change btnDisplay to say "click here to save your game". If it's over btnLoad, change btnDisplay to say "click here to restore a saved game", etc.) In which case, use Button.GetAtScreenXY, passing the mouse coordinates. If that is what you're after, I'd think you'd be better using a label and changing it's Text property, instead of having to make images for every 'help' description.
I know what you're thinking ... Don't think that.

InCreator


SMF spam blocked by CleanTalk