Skip to content

Commit 08e8f1b

Browse files
committed
Merge branch 'tooltip-composite-dbgview' into 'main'
Fix composite debug view tooltip, which needs manual newlines for readability See merge request lightspeedrtx/dxvk-remix-nv!2003
2 parents ad9558f + d3f21e4 commit 08e8f1b

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/dxvk/rtx_render/rtx_gui_widgets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ namespace RemixGui {
733733
SetItemDefaultFocus();
734734
}
735735
if (itemTooltip && itemTooltip[0] != '\0' && IsItemHovered()) {
736-
SetTooltipUnformatted(itemTooltip);
736+
SetTooltipUnformattedUnwrapped(itemTooltip);
737737
}
738738
PopID();
739739
}

src/dxvk/rtx_render/rtx_imgui.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ namespace RemixGui {
254254
ImGui::EndTooltip();
255255
}
256256

257+
void SetTooltipUnformattedUnwrapped(const char* text) {
258+
ImGui::BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None);
259+
ImGui::TextUnformatted(text);
260+
ImGui::EndTooltip();
261+
}
262+
257263
bool IsItemHoveredDelay(float delay_in_seconds) {
258264
return ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && GImGui->HoveredIdTimer > delay_in_seconds;
259265
}

src/dxvk/rtx_render/rtx_imgui.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace RemixGui {
1313

1414
IMGUI_API void SetTooltipUnformatted(const char* text); // Same as SetTooltip, just without text formatting (so percentage signs do not interfere with tooltips when not desired).
15+
IMGUI_API void SetTooltipUnformattedUnwrapped(const char* text); // Without text wrapping, when newlines need to be manual
1516
IMGUI_API bool IsItemHoveredDelay(float delay_in_seconds); // Same as IsItemHovered, but only returns true after the item was hovered for x amount of time
1617
IMGUI_API void SetTooltipToLastWidgetOnHover(const char* text); // Conditionally sets tooltip if IsItemHovered() is true
1718

0 commit comments

Comments
 (0)