OpenDreamProject / OpenDream

A project for running games made in the DM programming language
MIT License
200 stars 109 forks source link

Fix remaining click param issues #1940

Closed ike709 closed 1 month ago

ike709 commented 1 month ago

Resolves #1926

Test code:

/client/New()
    ..()
    show_popup_menus = FALSE

/client/Click(object,location,control,params)
    ..()
    src << "[params]"

I clicked the left, middle, and right mouse button once each with all modifiers held. Slight differences in coordinates are due to me not clicking the exactly identical spot.

BYOND:

icon-x=29;icon-y=29;left=1;ctrl=1;shift=1;alt=1;button=left;screen-loc=7:29,3:29
icon-x=29;icon-y=29;middle=1;ctrl=1;shift=1;alt=1;button=middle;screen-loc=7:29,3:29
icon-x=29;icon-y=29;right=1;ctrl=1;shift=1;alt=1;button=right;screen-loc=7:29,3:29

OpenDream: image

Note that middle-mouse is still broken in OD, ref #1925

I converted it to a StringBuilder because afaict all NameValueCollection was doing for us was escaping the colons in screen-loc and we weren't actually using it for anything since it just gets converted to a string at the end.

ike709 commented 1 month ago

As an example from SS13, re-arranging action buttons now works (ctrl+LMB (un)locks them for rearrangement):

https://github.com/user-attachments/assets/1c8daa48-d785-43bb-bfbb-7845bf6236f7