Correct me if I'm wrong, but you can't right-click on a custom INV window that has no item on the mouse coordinates, right?
I mean, if you click on a custom INV window and the PLACE you clicked has no INV item, your click does NOT get passed in any way. Even LEFTINV and RIGHTINV only get passed IF we're clicking on an inventory item.
This is very inconvenient, and it's also proved inconvenient to me in the past. Is there any way this could be changed? I mean, even the ability to do
if (interface==INV) {
if (button==0 && GetInvAt(mouse.x,mouse.y) {
...where button is the inventory window, naturally, would be extremely helpful.
I know this can be inconvenient, but I think currently it may be possible to work around this by checking it with on_mouse_click() (I'm not sure).
Hmmm, lemme try it out.
EDIT - Didn't try it out, but I'm sure it wouldn't work. Here's a bit of my code from On_Mouse_Click -
else if (button==RIGHT || button==RIGHTINV) { // right-click, bring shortcut
if (IsGUIOn(ACTION)) { (do some stuff) }
GUIOn(SHORT);
}
According to this, whenever the player right clicks the GUI SHORT should pop up. It doesn't when I right click on the inv window with no items, meaning the click isn't being processed at all... right?
I believe the workaround is to use the on_event GUI_MDOWN to find out this situation. I agree it's rather messy though, I'll see what I can do.
Ah, that worked wonders! Thanks!