-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Fix UI issues with Camera Monitor #31809
base: master
Are you sure you want to change the base?
Fix UI issues with Camera Monitor #31809
Conversation
Basically copy-pasted same solution from space-wizards#30292
Would you be able to make cameras toggle with arrow keys? |
That's unrelated to this PR. Feel free to make another PR with that feature yourself. |
var entries = listing.Select(i => new ItemList.Item(RecordListing) { | ||
Text = i.Value, | ||
Metadata = i.Key | ||
}).ToList(); | ||
entries.Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.Ordinal)); | ||
RecordListing.SetItems(entries, (a,b) => string.Compare(a.Text, b.Text)); |
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.
A clean up of the station records code should really be its own separate PR
Metadata = i.Key | ||
}).ToList(); | ||
entries.Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.Ordinal)); | ||
SubnetList.SetItems(entries, (a,b) => string.Compare(a.Text, b.Text)); |
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.
'SetItems' is popping up as a missing method in my IDE, and nothing else in the current code base seems to be using it. Please check this and update if necessary
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.
This PR depends on space-wizards/RobustToolbox#5425
If preferable, I can try making SetItems an extension method in Content.Client, so it doesn't require an RT change.
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.
Whoops, not sure how I managed to miss that!
As a heads up, we only have a few RT maintainers around right now, it could be a while before an engine PR gets merged
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
About the PR
Requires space-wizards/RobustToolbox#5425
When using the camera monitor UI, there were several usability issues:
Why / Balance
Bad UI -> Better UI
Technical details
Classic "delete and recreate the UI" losing state.
Since the code to merge items is basically identical to #30292 and is likely to occur again in other UIs, I've moved the item list merging code into RobustToolbox, so the criminal records UI got simplified to use the moved code.
Media
Before. List jumps, and the selected camera is only highlighted very briefly:
Peek.2024-09-03.21-17.mp4
After. Normal, human UI:
Peek.2024-09-03.21-43.mp4
Requirements
Breaking changes
Changelog