Right-click in inventory window

Started by Radiant, Tue 16/03/2004 12:56:12

Previous topic - Next topic

Radiant

Hi there,

I'm using a Sierra-style GUI. In the inventory window, I have buttons for 'look', 'touch' and 'select'. These all work and set the cursor appropriately
Now I'd like to have the right mouse button switch between these three modes and cursors... but right-clicking on the inventory GUI box simply triggers a look action. Checking for MouseButtonDown (RIGHT)  [sp?] in the interface_click function doesn't seem to help...
any suggestions would be welcome.

Scorpiorus

To catch mouse clicks over GUIs look for on_event() function:
function on_event (int event, int data) {

  if (event==GUI_MDOWN)  { // mouse button pressed over a GUI
    if (IsButtonDown(RIGHT)) {
      //cycle modes or whatever
      ...
    }
  }
}

~Cheers

SMF spam blocked by CleanTalk