-
Notifications
You must be signed in to change notification settings - Fork 151
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
Refactor debug text display into an IMGUI menu #833
Refactor debug text display into an IMGUI menu #833
Conversation
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.
I love it.
Although I approve of this PR in its current state, I will note that it may be better to move the "state/stats to string" parts into their respective classes (GuitarEngineState
, etc.) instead so it can be reused in the replay analyzer for example. Something similar is already done for the engine parameters.
Maybe. Typically I'd re-implement that manually since not all places that need the printed state/stats will necessarily need the same fields to be printed, or in the same order/formatting. For example, I deliberately left out some of the state variables in the IMGUI code, since their values never persist outside of engine updates. Too many variables to say for certain that it should be made into a common routine. |
Yeah, that's fair. The only reason why I mention this is a "problem" where, if a new state variable is added, it's hard to remember what things you gotta update as a result of that, especially from the perspective of a new contributor. Because of this I usually prefer to keep things near/in the class but... this is debug text who really cares lol. |
As I mentioned in the Discord you'll probably need to manually redo the gameplay scene changes, but after that I'll merge it (if it's done) |
2728709
to
3a70cde
Compare
Scene changes were simple enough to recover by hand, but there's some errors I need to resolve which require YARG.Core changes (or removal of certain debug lines). |
10efca3
to
603136e
Compare
56ec3e4
to
4cfaf05
Compare
Exposed more engine state/stat variables and re-added the removed display lines. Also made it dynamically change the max width/height allowed for the debug window based on the window size, for a better experience in larger windows. Everything should be good to go now! |
Lots more information is now displayed in a more organized manner.
The display starts off compact and unobtrusive:
Clicking each of the options expands the window to reveal information about that option:
The window can be dragged around, and clicking the Close button will reset the window to its default state and position (toggling the window with Ctrl + Tab does not reset it currently.)