Updated ImGui.

This commit is contained in:
Branimir Karadžić 2016-06-19 17:13:53 -07:00
parent 3c4d66ea23
commit f9744ac650

View File

@ -1951,8 +1951,7 @@ float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x)
else if (wrap_pos_x > 0.0f)
wrap_pos_x += window->Pos.x - window->Scroll.x; // wrap_pos_x is provided is window local space
const float wrap_width = wrap_pos_x > 0.0f ? ImMax(wrap_pos_x - pos.x, 0.00001f) : 0.0f;
return wrap_width;
return ImMax(wrap_pos_x - pos.x, 1.0f);
}
//-----------------------------------------------------------------------------
@ -5362,9 +5361,7 @@ void ImGui::TextUnformatted(const char* text, const char* text_end)
const ImVec2 text_size = CalcTextSize(text_begin, text_end, false, wrap_width);
// Account of baseline offset
ImVec2 text_pos = window->DC.CursorPos;
text_pos.y += window->DC.CurrentLineTextBaseOffset;
ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrentLineTextBaseOffset);
ImRect bb(text_pos, text_pos + text_size);
ItemSize(text_size);
if (!ItemAdd(bb, NULL))