ToastQueue: make toasts wrap instead of cutting them off.
This commit is contained in:
parent
a166948aec
commit
3be094febc
1 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue