Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: RickJ on Thu 17/04/2003 03:53:08

Title: Quirk: GUI button's active area doesn't resize.
Post by: RickJ on Thu 17/04/2003 03:53:08
The GUI button's active area doesn't resize when the button is resized using SetButtonPic().

If SetButtonPic() is used to change a button's appearance and if the new graphic is of a different size the mouse-over and click events still use the original button size and not the new one.   It would seem more intuitive, to me, if this area were determined by the graphic used for the "normal" view.  

Would it be possible in some future version to have the SetButtonPic() function, calculate and update the button size parameters, whenever it is used to change the "normal" grahic?


 
Title: Re:Quirk: GUI button's active area doesn't resize.
Post by: Pumaman on Thu 17/04/2003 19:12:25
Sounds sensible to me - would anyone have a problem if SetButtonPic did this automatically?
Title: Re:Quirk: GUI button's active area doesn't resize.
Post by: Scorpiorus on Fri 18/04/2003 13:51:02
Suggestion is handy as well as there are maybe a particular situation when autosizing isn't preferable(trying to figure out when  ::)) . maybe an option then? :P

EDIT: or maybe the option is useless in case if the button's bounds do not cut the image(I can't remember now).

-Cheers
Title: Re:Quirk: GUI button's active area doesn't resize.
Post by: Pumaman on Fri 18/04/2003 14:34:07
The button's bounds don't clip the image - they just decide the rectangle in which the mouse click will register.

Thinking about it, I can't see a situation where resizing automatically would be a problem. At the moment, virtually all SetButtonPic calls are used to change it to another image of the same size anyway.
Title: Re:Quirk: GUI button's active area doesn't resize.
Post by: Scorpiorus on Fri 18/04/2003 19:24:02
oh, as it's a button (and it doesn't clip the image) then consequently the whole image area should be clickable. Autoresizing! :P

-Cheers