From 01d2b3e3bc074b478886cc63ed66157ff1f44ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Wed, 26 Jun 2024 22:42:43 +0200 Subject: [PATCH] Highlight hovered and active color picker scrollbar handle Add visual feedback to color picker scrollbar handle being hovered and active. --- src/game/client/ui.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/client/ui.cpp b/src/game/client/ui.cpp index 16830838c..4dda00591 100644 --- a/src/game/client/ui.cpp +++ b/src/game/client/ui.cpp @@ -1381,19 +1381,20 @@ float CUi::DoScrollbarH(const void *pId, const CUIRect *pRect, float Current, co } // render + const ColorRGBA HandleColor = ms_ScrollBarColorFunction.GetColor(CheckActiveItem(pId), HotItem() == pId); if(pColorInner) { CUIRect Slider; Handle.VMargin(-2.0f, &Slider); Slider.HMargin(-3.0f, &Slider); - Slider.Draw(ColorRGBA(0.15f, 0.15f, 0.15f, 1.0f), IGraphics::CORNER_ALL, 5.0f); + Slider.Draw(ColorRGBA(0.15f, 0.15f, 0.15f, 1.0f).Multiply(HandleColor), IGraphics::CORNER_ALL, 5.0f); Slider.Margin(2.0f, &Slider); - Slider.Draw(*pColorInner, IGraphics::CORNER_ALL, 3.0f); + Slider.Draw(pColorInner->Multiply(HandleColor), IGraphics::CORNER_ALL, 3.0f); } else { Rail.Draw(ColorRGBA(1.0f, 1.0f, 1.0f, 0.25f), IGraphics::CORNER_ALL, Rail.h / 2.0f); - Handle.Draw(ms_ScrollBarColorFunction.GetColor(CheckActiveItem(pId), HotItem() == pId), IGraphics::CORNER_ALL, Handle.h / 2.0f); + Handle.Draw(HandleColor, IGraphics::CORNER_ALL, Handle.h / 2.0f); } return ReturnValue;