Show tooltips for multiline messages

This commit is contained in:
casqade
2026-04-25 17:27:13 +03:00
parent 43643ba0b6
commit 29d21fe1f7
2 changed files with 2 additions and 2 deletions

View File

@@ -365,7 +365,7 @@ void View::DrawMessageLine( const MessageData& msg, bool hasCallstack, int& idx
const auto cw = ImGui::GetContentRegionAvail().x;
const auto tw = ImGui::CalcTextSize( text, tend ).x;
ImGui::TextUnformatted( text, tend );
if( tw > cw && ImGui::IsItemHovered() )
if( (tw > cw || *tend != '\0') && ImGui::IsItemHovered() )
{
ImGui::SetNextWindowSize( ImVec2( 1000 * GetScale(), 0 ) );
ImGui::BeginTooltip();

View File

@@ -863,7 +863,7 @@ void View::DrawZoneInfoWindow()
const auto cw = ImGui::GetContentRegionAvail().x;
const auto tw = ImGui::CalcTextSize( text, tend ).x;
ImGui::TextUnformatted( text, tend );
if( tw > cw && ImGui::IsItemHovered() )
if( (tw > cw || *tend != '\0') && ImGui::IsItemHovered() )
{
ImGui::SetNextWindowSize( ImVec2( 1000 * GetScale(), 0 ) );
ImGui::BeginTooltip();