-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep mod customisation panel open when dragging outside #29541
Keep mod customisation panel open when dragging outside #29541
Conversation
{ | ||
ExpandedState.Value = ModCustomisationPanelState.Collapsed; | ||
if (!ReceivePositionalInputAt(inputManager!.CurrentState.Mouse.Position) && inputManager.DraggedDrawable == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit baffled by this NRT usage, why declare inputManager
as InputManager?
if you're just going to silence null inspections at point of usage here? Just make the field non-nullable from the start?
Also is there any point to splitting this into two nested if
s rather than adding a third condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I can silence it elsewhere.
Two ifs read better to me, not a big fan of very long conditionals. Probably just me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silence at point of assignment IMO.
I don't know if I should report it, but there is a super edge case where the panel doesn't collapse if you are dragging a slider that is NOT in the customisation panel. This could be reproduced by the following steps:
2024-08-23.17-55-44-encoded.mp4 |
Don't think it matters. |
Really wish hover is not being eaten from the
FocusGrabbingContainer
so we don't have to doReceivePositionalInputAt
but I don't think it's worth checking on that.