adventuregamestudio / ags

AGS editor and engine source code
Other
702 stars 160 forks source link

AGS4: Eliminate special Inventory MouseButton values #1283

Open messengerbag opened 3 years ago

messengerbag commented 3 years ago

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."

ivan-mogilko commented 3 years ago

There was another related ticket here: #472, these may be considered together.