Fix margins on icon-only messages
Messages with an icon and no text (such as in the game start sequence) had an oversized margin due to ImGui adding padding for an empty string.
This commit is contained in:
parent
1b00b4e3d8
commit
a79f428972
|
@ -116,6 +116,7 @@ static float DrawMessage(int index, Message& msg, const ImVec2& position, int ti
|
|||
}
|
||||
|
||||
// Use %s in case message contains %.
|
||||
if (msg.text.size() > 0)
|
||||
ImGui::TextColored(ARGBToImVec4(msg.color), "%s", msg.text.c_str());
|
||||
window_height =
|
||||
ImGui::GetWindowSize().y + (WINDOW_PADDING * ImGui::GetIO().DisplayFramebufferScale.y);
|
||||
|
|
Loading…
Reference in New Issue