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
1 changed files with 3 additions and 6 deletions

View File

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