Hi
I'm wondering. mainly because I would like to do this, is it possible to have the mouse cursor change to the hand icon when over any GUI button?
cheers
barefoot
Yes, yes it is possible:
// GlobalScript.asc
function repeatedly_execute_always()
{
GUIControl *gcat = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if ((gcat == null) || (gcat.AsButton == null)) mouse.UseDefaultGraphic();
else mouse.UseModeGraphic(eModeHand);
}
That's a bit a bit selfish as it doesn't directly interoperate nicely with other scripts, but it fits the task at hand, and with a bit of tweaking could be made to work with other scripts where you may be using the UseModeGraphic function.
Thanks very much Monkey.. I'll give it a go..
cheers :=
barefoot
Yep.. this works for me :=
function repeatedly_execute_always()
{
GUIControl *gcat = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if ((gcat == null) || (gcat.AsButton == null)) mouse.UseDefaultGraphic();
else mouse.UseModeGraphic(2);
}
cheers Monkey.. Thanks a million...
barefoot
Can I ask why you would want to use an arbitrary number in place of the cursor's name (by way of the eMode enumerated value)? From a technical standpoint the two are completely equatable within AGS, but I don't understand why that would be preferable to you (as a human..you are human, right? :o)
Hi Monkey
the reason is because an error comes up when i use (eModeHand); for some reason...
Iv'e since discovered that using (eModeInteract); actually works the same as the number you so rightly pointed out to me.. :=
And yes, I am human.. I think (but not too hard) ;D
barefoot