-
Notifications
You must be signed in to change notification settings - Fork 4.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
Text on the debug "Add effect" in "Edit player/NPC" function clips out of window #78895
Comments
maybe it's something I can fix in the ImGui demo settings? or maybe the terminal settings? |
From what I understand after staring at the code, is that there are many checks to ensure the window will display all contained information, but no checks against the width of the terminal ( This is the janky fix I've been experimenting with Kilvoctu@c7d632b. It seems to work for this and other windows I've been testing with. However, idunno C++ and am not familiar with ImGui, so it's probably bad and illogical. |
Sounds good, I'll wait a few weeks and re-update the build and see if it's fixed. |
@Kilvoctu Clipping to I tried to do so myself, but ran into issue that i couldn't quite get the padding right (see pic in #78771 for the in-progress not-quite-working state) . There are like four different kinds of padding, and it's not clear when to use which one. I just now pushed the code to moxian/Cataclysm-DDA@dcd2e1d but it's been a couple of days since i last touched it, and i'm not sure if it even builds in the current state - there might be a syntax error or something. While taking a shower, I got an idea that my padding woes can perhaps be fixed by telling ImGui to auto-resize the window appropriately (and stop trying to set the margins by hand), but I never got around to investigating how to do this, and if it's even possible Idk if this helps, but if you want to get this code into workable state - you're more than welcome to (no pressure tho). |
It's all very helpful, thanks! I'll continue fiddling around with it, though it's probably outside my skill level. My only decent skill is reading and interpreting code so providing examples is great. |
Sadly, that will just make ImGui enlarge the window to fit whatever gigantic piece of text we’re trying to display, which the exact same problem we already have. :) Autoresize is usually for windows whose contents change size as the user interacts with it. Most of the complexity of the uilist exists because it is trying to be all things to all callers. That said, now that we have Currently most callers wrap the text to a convenient width before giving it to the uilist to display. This is a much simpler fix to implement. For example, take a look at this code in Cataclysm-DDA/src/handle_action.cpp Lines 1528 to 1530 in ca1949d
|
Describe the bug
When opening the window for editing the effects on the player the text is clipping out of the window.
Attach save file
N/A
Steps to reproduce
Expected behavior
After selecting the option to edit the effects on an NPC or yourself, a ImGui window will open and the text displayed will clip out of the window.
Screenshots
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth],
No Hope [no_hope],
Culinary Days Ahead [culinary_days_ahead],
Alternative Map Key [alt_map_key],
SpeedyDex [speedydex],
Stats Through Skills [StatsThroughSkills],
Stats Through Kills [stats_through_kills],
Tamable Wildlife [Tamable_Wildlife]
]
Additional context
No response
The text was updated successfully, but these errors were encountered: