Inventory clicks not clicking [SOLVED]

Started by Ultra Magnus, Mon 02/03/2009 08:13:08

Previous topic - Next topic

Ultra Magnus

My inventory has stopped responding, and I don't know what I did to it.
The cancel button works, so it's not that it's not clickable, but the actual inv items do nothing.

Also, I had it so that clicking off of the window would close it, but that's stopped working, too.

Code: ags

function on_mouse_click(MouseButton button) {
  if (IsGamePaused() == 1) {
  // Doing nothing
  }

  else if (mouse.Mode!=eModePointer && isguiopen==true && GUIControl.GetAtScreenXY(mouse.x, mouse.y)==null) {
    if (button==eMouseLeft) {
      gInventory.Visible=false;
      lblInventoryStatus.Text=" ";
      isguiopen=false;
      if (mouse.Mode == eModeInteract) {
        mouse.Mode=eModeLookat;
      }
    }
  }

  else if (button==eMouseLeftInv) {
    if (InventoryItem.GetAtScreenXY(mouse.x, mouse.y)==iMap) {
      gMap.Visible=true;
      gInventory.Visible=false;
      mouse.Mode=eModePointer;
      lblInventoryStatus.Text=" ";
    }

    else if (player.ActiveInventory!=null) {
      inventory[game.inv_activated].RunInteraction(eModeUseinv);
    }

    else {
      player.ActiveInventory=InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
      mouse.Mode=eModeUseinv;
    }
  }

  else if (button==eMouseLeft) {
    ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
}


Help.

Disregard.
I don't mean to sound bitter, cold, or cruel, but I am, so that's how it comes out.

I'm tired of pretending I'm not bitchin', a total frickin' rock star from Mars.

Trent R

Ummm.... not sure, but what's the Visibilty setting? Such as 'Normal initially off' and such. I ask because of the IsGamePaused call at the beginning.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Ultra Magnus

You're a genius.
I'm an idiot. ::)

It was "Pause game while shown", and it obviously works now that I've changed it.
I thank you, sir.

I guess what threw me off was that the cancel button still worked.

False alarm, people.
Nothing to see here.
I don't mean to sound bitter, cold, or cruel, but I am, so that's how it comes out.

I'm tired of pretending I'm not bitchin', a total frickin' rock star from Mars.

SMF spam blocked by CleanTalk