proc/button_from_mouse_params(params)
var/list/info = params2list(params)
return info["button"] || (
info["left"] ? "left" : \
info["right"] ? "right" : \
info["middle"] ? "middle" : \
null)
https://cdn.discordapp.com/attachments/725458744711839873/ 974997127405121556/MouseButtons513_src.zip
Order of events:
1. Press LMB
2. Press MMB
3. Press RMB
4. Release RMB
5. Release MMB
6. Release LMB
513:
icon-x=1;icon-y=1;left=1;screen-loc=1:1,1:1
icon-x=1;icon-y=1;middle=1;screen-loc=1:1,1:1;drag=left
icon-x=1;icon-y=1;right=1;screen-loc=1:1,1:1;drag=left
icon-x=1;icon-y=1;right=1;screen-loc=1:1,1:1;drag=left
icon-x=1;icon-y=1;middle=1;screen-loc=1:1,1:1;drag=left
icon-x=1;icon-y=1;left=1;screen-loc=1:1,1:1
514:
icon-x=1;icon-y=1;left=1;button=left;screen-loc=1:1,1:1
icon-x=1;icon-y=1;left=1;middle=1;button=middle;drag=left;screen-loc=1:1,1:1
icon-x=1;icon-y=1;left=1;right=1;middle=1;button=right;drag=left;screen-loc=1:1,1:1
icon-x=1;icon-y=1;left=1;right=1;middle=1;button=right;drag=left;screen-loc=1:1,1:1
icon-x=1;icon-y=1;left=1;middle=1;button=middle;drag=left;screen-loc=1:1,1:1
icon-x=1;icon-y=1;left=1;button=left;screen-loc=1:1,1:1
In 514, the "left", "middle", "right" parameters are incorrectly all included in the MouseUp if they were just being pressed. Before, only the button that was pressed/released would be included. This change makes those parameters useless.
Also, the new "button" parameter is not documented, though it makes for a great workaround.