FAForever / fa

Lua code for FAF
221 stars 228 forks source link

Implement GetMousedOverWorldView #6316

Closed lL1l1 closed 23 hours ago

lL1l1 commented 3 days ago

Description of the proposed changes

Adds a function that gets the moused over WorldView.

Testing done on the proposed changes

Using the function returns the view as expected.

Additional context

Will be used by area attack dragger in #6317.

Checklist

Garanas commented 3 days ago

I think GetMousedOverWorldView is a little vague description of what the function does. What if instead we call it GetTopmostWorldView which is similar to GetTopmostDepth of frames?

edit: and I think you can generalize the function by not forcing the mouse position, but accepting a table as a parameter. And then the maintainer can decide where that originates from.