mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-14 17:07:01 +00:00
BeginTooltip: correctly testing return value of BeginTooltipEx() even though it always return true in current code.
Amend 3b2f617
This commit is contained in:
parent
c426e32247
commit
552969e33e
@ -9942,7 +9942,8 @@ void ImGui::EndTooltip()
|
||||
|
||||
void ImGui::SetTooltipV(const char* fmt, va_list args)
|
||||
{
|
||||
BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None);
|
||||
if (!BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None))
|
||||
return;
|
||||
TextV(fmt, args);
|
||||
EndTooltip();
|
||||
}
|
||||
|
@ -5759,7 +5759,8 @@ void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None);
|
||||
if (!BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None))
|
||||
return;
|
||||
const char* text_end = text ? FindRenderedTextEnd(text, NULL) : text;
|
||||
if (text_end > text)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user