mirror of
https://github.com/xemu-project/imgui.git
synced 2024-11-24 02:39:58 +00:00
Merge remote-tracking branch 'origin' into 2016-07-navigation
This commit is contained in:
commit
c203be94c6
@ -7038,7 +7038,7 @@ void ImGui::BulletTextV(const char* fmt, va_list args)
|
||||
|
||||
const char* text_begin = g.TempBuffer;
|
||||
const char* text_end = text_begin + ImFormatStringV(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), fmt, args);
|
||||
const ImVec2 label_size = CalcTextSize(text_begin, text_end, true);
|
||||
const ImVec2 label_size = CalcTextSize(text_begin, text_end, false);
|
||||
const float text_base_offset_y = ImMax(0.0f, window->DC.CurrentLineTextBaseOffset); // Latch before ItemSize changes it
|
||||
const float line_height = ImMax(ImMin(window->DC.CurrentLineHeight, g.FontSize + g.Style.FramePadding.y*2), g.FontSize);
|
||||
const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize + (label_size.x > 0.0f ? (label_size.x + style.FramePadding.x*2) : 0.0f), ImMax(line_height, label_size.y))); // Empty text doesn't add padding
|
||||
@ -7048,7 +7048,7 @@ void ImGui::BulletTextV(const char* fmt, va_list args)
|
||||
|
||||
// Render
|
||||
RenderBullet(bb.Min + ImVec2(style.FramePadding.x + g.FontSize*0.5f, line_height*0.5f));
|
||||
RenderText(bb.Min+ImVec2(g.FontSize + style.FramePadding.x*2, text_base_offset_y), text_begin, text_end);
|
||||
RenderText(bb.Min+ImVec2(g.FontSize + style.FramePadding.x*2, text_base_offset_y), text_begin, text_end, false);
|
||||
}
|
||||
|
||||
void ImGui::BulletText(const char* fmt, ...)
|
||||
|
Loading…
Reference in New Issue
Block a user