Describe the problem
Currently (as of 3.5), the MouseButton enum features special values for when the mouse is clicked over an inventory window: eMouseLeftInv, eMouseMiddleInv, and eMouseRightInv.
This is a pointless and unintuitive complication (presumably a legacy feature from way back in the day to solve some issue that is no longer relevant). It makes it harder to write UI code, and it trips up newbies who aren't aware of it.
Suggested change
Remove these values, and change the behavior so that Mouse.IsButtonDown()and on_mouse_click() report button presses consistently regardless of what the cursor is over.
As part of this change, you may also want to consider getting rid of "built-in inventory window click handling" altogether, and therefore also the project option "Override built-in inventory window click handling."
Describe the problem Currently (as of 3.5), the
MouseButton
enum features special values for when the mouse is clicked over an inventory window:eMouseLeftInv
,eMouseMiddleInv
, andeMouseRightInv
.This is a pointless and unintuitive complication (presumably a legacy feature from way back in the day to solve some issue that is no longer relevant). It makes it harder to write UI code, and it trips up newbies who aren't aware of it.
Suggested change Remove these values, and change the behavior so that
Mouse.IsButtonDown()
andon_mouse_click()
report button presses consistently regardless of what the cursor is over.As part of this change, you may also want to consider getting rid of "built-in inventory window click handling" altogether, and therefore also the project option "Override built-in inventory window click handling."