From 36073586e7770da2fc2f4a92643429a0ede79a4b Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 14 Aug 2021 22:23:37 -0400 Subject: [PATCH] [client] egl: add tooltip about Ctrl+Click on sharpness sliders With the new keymap feature, we are now able to properly support letting the user enter exact values into the sliders. This commit adds a tooltip to help the user discover this feature. Note that this currently only works on Wayland. The X11 backend will need to call app_handleKeyboardModifiers. --- client/renderers/EGL/filter_ffx_cas.c | 2 ++ client/renderers/EGL/filter_ffx_fsr1.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/client/renderers/EGL/filter_ffx_cas.c b/client/renderers/EGL/filter_ffx_cas.c index 3b4ebb64..a486f74c 100644 --- a/client/renderers/EGL/filter_ffx_cas.c +++ b/client/renderers/EGL/filter_ffx_cas.c @@ -177,6 +177,8 @@ static bool egl_filterFFXCASImguiConfig(EGL_Filter * filter) igGetStyle()->WindowPadding.x); igSliderFloat("##casSharpness", &casSharpness, 0.0f, 1.0f, NULL, 0); + if (igIsItemHovered(ImGuiHoveredFlags_None)) + igSetTooltip("Ctrl+Click to enter a value"); igPopItemWidth(); if (casSharpness != this->sharpness) diff --git a/client/renderers/EGL/filter_ffx_fsr1.c b/client/renderers/EGL/filter_ffx_fsr1.c index 4e97da29..0241e9f6 100644 --- a/client/renderers/EGL/filter_ffx_fsr1.c +++ b/client/renderers/EGL/filter_ffx_fsr1.c @@ -280,6 +280,8 @@ static bool egl_filterFFXFSR1ImguiConfig(EGL_Filter * filter) igPushItemWidth(igGetWindowWidth() - igGetCursorPosX() - igGetStyle()->WindowPadding.x); igSliderFloat("##fsr1Sharpness", &sharpness, 0.0f, 1.0f, NULL, 0); + if (igIsItemHovered(ImGuiHoveredFlags_None)) + igSetTooltip("Ctrl+Click to enter a value"); igPopItemWidth(); if (sharpness != this->sharpness)