ToastQueue: make toasts wrap instead of cutting them off.

This commit is contained in:
Guillaume Jacquemin 2022-03-31 17:58:37 +02:00
parent a166948aec
commit 3be094febc

View file

@ -142,12 +142,9 @@ void ToastQueue::draw(Vector2i viewport_size) {
ImGui::SameLine();
}
if(current->message().size() > 127) {
ImGui::TextColored(colour, "%.*s...", 127, current->message().data());
}
else {
ImGui::PushTextWrapPos(500.0f);
ImGui::TextColored(colour, current->message().data());
}
ImGui::PopTextWrapPos();
height += ImGui::GetWindowHeight() + toast_spacing;
}