Changing a cursor and back when over hotspots

Started by the cranky hermit, Tue 18/05/2004 21:40:35

Previous topic - Next topic

the cranky hermit

In my game, I've made a compass GUI for navigation. When you move the cursor over a hotspot in the lower-right corner, the compass pops up, and the mouse cursor changes to an arrow. The problem is, when you move the cursor back, the cursor does not revert to whatever it was before. I've tried adding a hotspot0 function to every room that does this:

function hotspot0_a()
   {
   // script for hotspot0: Mouse moves over hotspot
   SetDefaultCursor();
   }

This fixes that problem, but it creates another. I'm using a custom inventory GUI. It has a "select" function that operates like a hand but uses an arrow cursor. When the above hotspot is used, the arrow cursor reverts to a hand if I move it a pixel.

How can I solve my problem? Or is there a better way to accomplish my goals? TYIA.

the cranky hermit

Oh yeah, one other thing. When the inventory is open, the toolbar and compass still pop up when you roll the mouse over. I'd like to stop that.

Scorpiorus

QuoteWhen the above hotspot is used, the arrow cursor reverts to a hand if I move it a pixel.

Try the next code:

function hotspot0_a()
{
   // script for hotspot0: Mouse moves over hotspot

   if (IsGUIOn(INVENTORY_GUI)==0) SetDefaultCursor();
}


QuoteOh yeah, one other thing. When the inventory is open, the toolbar and compass still pop up when you roll the mouse over. I'd like to stop that.
Well, again IsGUIOn() comes in handy:

function hotspot*()
{
// script for hotspot*: Mouse moves over hotspot

   if (IsGUIOn(INVENTORY_GUI)==0) {

      GUIOn(COMPASS);
      GUIOn(TOOLBAR);
   }

}

SMF spam blocked by CleanTalk