IsmAvatar / LateralGM

A free Game Maker source file editor
http://lateralgm.org/
Other
90 stars 25 forks source link

Update Deprecated Input Modifiers #542

Closed RobertBColton closed 3 years ago

RobertBColton commented 3 years ago

I finally figured out how to deal with the e.getModifiers() deprecation warning and decided to get it done. It's a little confusing because you have to understand the different event types and ways of checking which buttons are down.

The fact that e.getModifiers() behaves closer to e.getButton() is why it's not always correct to use the recommended e.getModifiersEx() in place of the deprecated one. This is the case for mouse motion events which would behave differently if we were trying to check that a button was being held during drag using e.getButton() because the button would only change state once, we would need e.getModifiersEx() to check that said button was held continuously.

Changed event panel action event to use correct mask from ActionEvent which is not deprecated. Removed unused imports that are no longer needed. Pulled and updated JoshEdit submodule with similar fixes. Tested and verified all of this continues to behave exactly as before. Now down to 62 warnings.