From 2047d5725b9e955eebd42bd1c2c6c6b7298e4129 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 3 May 2024 17:42:50 +0200 Subject: [PATCH] ConfigMenu: Reduce flickering when a plugin config is opened --- source/utils/config/CategoryRenderer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/utils/config/CategoryRenderer.cpp b/source/utils/config/CategoryRenderer.cpp index 87877fc..d821176 100644 --- a/source/utils/config/CategoryRenderer.cpp +++ b/source/utils/config/CategoryRenderer.cpp @@ -35,6 +35,12 @@ CategoryRenderer::CategoryRenderer(const GeneralConfigInformation *info, const W if (!mItemRenderer.empty()) { mItemRenderer[mCursorPos]->SetIsSelected(true); } + + // Make sure to call Update to get the current text of an item. + for (uint32_t i = 0; i < mItemRenderer.size(); i++) { + bool isHighlighted = ((int) i == mCursorPos); + mItemRenderer[i]->Update(isHighlighted); + } } CategoryRenderer::~CategoryRenderer() {