Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Coolio on Wed 08/11/2006 07:55:20

Title: keeping cursor mode when over gui [SOLVED]
Post by: Coolio on Wed 08/11/2006 07:55:20
Is it possible to keep the current cursor mode when the cursor is moved over a gui so that if, for example, the cursor mode was set to 1 it would stay set to 1 (does it change the cursor mode or just the graphic?) when the cursor was moved over a gui.
Its a simple problem, but I was just wondering if what I said is possible or whether it is coded into the AGS engine.
Thanks :)
Title: Re: keeping cursor mode when over gui
Post by: Ashen on Wed 08/11/2006 11:06:27
Depends on a number of things. Mainly, what GUI you're talking about.

GUIs with the 'Mouse Ypos' visibility type (like the default gIconbar) will change the cursor GRAPHIC to eModePointer, but leave the MODE the same. This is hardcoded behaviour and the only way to change it is to use a 'Normal' GUI, and code the Ypos behaviour yourself.
gInventory (if you open it using show_inventory_window) will change the Mode to eModeInteract, and set the Graphic to eModePointer. You can change this by altering the show_inventory_window function (should be just below repeatedly_execute in the Global Script).
No other GUI should do anything to the Cursor at all, unless you've told it to. Couldn't say what they do or how to change it, without seeing the related code.
Title: Re: keeping cursor mode when over gui
Post by: Coolio on Wed 08/11/2006 21:54:08
Thanks that's exactly what I wanted to know. I wasn't going to have the gui popup in the end anyway, but I just hadn't gotten around to fixing up the guis and stuff yet. Thanks for the info. :)