Add controls for viewing off-screen GUI text#85
Add controls for viewing off-screen GUI text#85splatoon1enjoyer wants to merge 1 commit intowiiu-env:mainfrom
Conversation
There was a problem hiding this comment.
Maybe I am not understanding the purpose of the PR correctly, but if the string is too long it still gets completely rendered, covered the actual config value? You probably want to use the StringTools::truncate which has a eplisis option (see:
)
Also when I hold the stick to the right, it wraps back at some point and can I never see the full string. Without further investigation it might be related to the code I commented
|
|
||
| text.erase(0, offset); | ||
| if (text.size() < MIN_TEXT_WIDTH_FOR_SCROLL) { | ||
| offset = 0; |
|
How about text that automatically scrolls? e.g. the GuiText class from the hombrew launcher has support for it, maybe it can be used as a base? |
That is indeed an issue. My main use case for this was for logging via stub config items (which is the reason I initially made the PR), so I did not notice or account for config items that hold properties, because it would be very unusual for a config option to have lengthy text. An easy fix for me to implement would probably be subtracting the length of the property, if one exists. I will follow-up on this one with a fix.
I did that intentionally so that you do not have to scroll all the way back or change the selected element to move back to the front of the text. If you think this is annoying, I can get rid of it.
I did consider this, but I think that it could be annoying for users if the text automatically resets when the scrolling reaches the end before they can read the text, and additionally if we did this we would likely need to have some sort of global option for modifying the auto-scrolling speed. If you want me to do it I can try to implement it like that, but I don't think it would be as ergonomic for users as the manual option. |
Description
This PR adds controls for viewing off-screen GUI text for all GUI elements. The "zoomed" text gets erased when switching the selected element.
Controls