-
Notifications
You must be signed in to change notification settings - Fork 220
Extend the "Strings" view in debug screen to display names of StringVars (+ some debug screen adjustments) #3398
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
Conversation
- Extended & refactored window_varlist to support displaying data over multiple lines This is neccessary to have proper space for extended information on some special data types (for now StringVars; -> and at a later time also ScopedVars, which need more lines too) - Removed the unneccessary copying of in-game strings - Refactored part of the Range_Window setup code to be able to display more digits when viewing Switch/Variable ranges above 9999 - Maniacs 241028: Implemented the display for StringVar names - Added a special function for button "Shift" in the debug scene: Pressing this button changes display modes for the current window (Currently only implemented for strings, to toggle between the old single-line display & the newer detailed one, that also included the name) - Some other minor refactoring & moving of code parts
…will be refactored to make use of the revised var_window)
src/window_varlist.h
Outdated
| case eString: | ||
| return "St"; | ||
| default: | ||
| break; |
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.
move the assert(false) into the default: followed by return {};. Yeah, compiler is picky here because assert is removed in release builds.
| } | ||
|
|
||
| constexpr int Window_VarList::GetDigitCount(Mode mode) { | ||
| return 4; |
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.
github action reports unused parameter 'mode' [-Wunused-parameter]
Ghabry
left a comment
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.
besides the 2 warnings looks good to me
|
Nitpick - maybe could be helpful resorting the items on the debug menu: Menu 1 - Player Actions Menu 2 - Development Tools maybe we could also remember the latest page opened on the debug menu, for quick repetitive debbuging Feel free to do any other suggestion of improvement |
|
can you move this to an issue? This doesn't fit here. |
|
sure! |
95d4ea9 to
0f57bbd
Compare
carstene1ns
left a comment
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.
Looks good to me.




Self-explanatory, but I also included some refactors of the existing var_window, to make it more useful for displaying certain kinds of data that might need more than a single line.
(My ScopedVars branch for example, would also display multiple lines per scoped variable type)
StringVar names have been added with ManiacPatch 241028 & also provide a useful way to detect this major update without having to rely on reading the EXE:
(Even if no StringVars are used, at least one list entry will be included in this new LDB field by default)
Updated Strings view
By default, the view stays as before:

And by pressing SHIFT, it toggles to the new display mode that displays individual entries over two lines & includes the var name:

Another new addition:
Previously, displaying data for Switches/Variables above the ID 9999 would overflow the text:

This has been adjusted, by shortening the prefix to a single character + changing the way the text is formatted:
