AGS keeps showing walking icon with my custom Quit gui.
if (keycode == eKeyCtrlQ){
mouse.UseModeGraphic(eModePointer);
gQuitter.Visible = true; // Ctrl-Q
}
Try: mouse.Mode = eModePointer
I tried:
if (keycode == eKeyCtrlQ){
mouse.UseModeGraphic(eModePointer);
mouse.Mode = eModePointer;
gQuitter.Visible = true; // Ctrl-Q
}
The walking cursor still appears.
But the code I just found works fine. See bellow.
function repeatedly_execute_always() {
// Put anything you want to happen every game cycle, even
// when the game is blocked inside a command like a
// blocking Walk().
// You cannot run blocking commands from this function.
if (IsGUIOn(9)){
mouse.UseModeGraphic(eModePointer);
}
}
Maybe there is an easier way to do.
This doesn't change the cursor to eModePointer:
mouse.UseModeGraphic(eModePointer)
What that's doing is changing the current mode's graphic to the graphic of eModePointer.
Are you sure there isn't something in your script that's changing the mouse mode to eModeWalkto?
Thanks Ryan.
Here a new code.
function repeatedly_execute_always() {
// Put anything you want to happen every game cycle, even
// when the game is blocked inside a command like a
// blocking Walk().
// You cannot run blocking commands from this function.
if (gQuitter.Visible) mouse.Mode = eModePointer;
}
My new code works fine.
Thanks to everybody.
Ok, so you're forcing AGS back into eModePointer. Sure, that will work. But it's always better to fix the original problem, instead of patching over it like that.
In some repeatedly_execute of yours, the pointer is changed to eModeWalkto, presumably because GetLocationType() returns eLocationNothing.