You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but doesn't output newlines between the "lines", producing the same output as with no wrapping.
I tried this:
int l = 0;
for( const std::string &line : folded_msg ) {
if( l++ != 0 ) {
ImGui::NewLine();
}
and this gets it to display just the first line, with the other lines cut off below. Adding newlines in other places for testing causes other uilists to misbehave, demonstrating that the uilist doesn't resize vertically for multi-line items. Adding a newline to every item results in the bottom half of items being lost.
Also, even when drawing only the first line, the uilist interface is still the full wider-than-my-screen width, so something is wrong there too.
That's as far as I got before I had other issues to attend to. I may try to pick this up again later, but it may be better handled by someone more familiar with ImGui.
The text was updated successfully, but these errors were encountered:
Describe the bug
The uilist for choosing a type of faction camp doesn't wrap its text, causing the interface to be wider than my screen for the barebones camp.
Attach save file
N/A
Steps to reproduce
Expected behavior
text wraps
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]
]
Additional context
uilist_impl::draw_controls
is callingcataimgui::draw_colored_text
with nowrap_width
I tried this:
but the width produced was ~7e31 which is... too big.
I tried this:
and it generated an appropriate width of 960, then I could see the text in
folded_msg
split into three lines, which is also good.However,
cataimgui::draw_colored_text
doesn't actually wrap text! It does this:but doesn't output newlines between the "lines", producing the same output as with no wrapping.
I tried this:
and this gets it to display just the first line, with the other lines cut off below. Adding newlines in other places for testing causes other uilists to misbehave, demonstrating that the uilist doesn't resize vertically for multi-line items. Adding a newline to every item results in the bottom half of items being lost.
Also, even when drawing only the first line, the uilist interface is still the full wider-than-my-screen width, so something is wrong there too.
That's as far as I got before I had other issues to attend to. I may try to pick this up again later, but it may be better handled by someone more familiar with ImGui.
The text was updated successfully, but these errors were encountered: