Skip to content

Commit

Permalink
ConfigMenu: Reduce flickering when a plugin config is opened
Browse files Browse the repository at this point in the history
  • Loading branch information
Maschell committed May 3, 2024
1 parent 343092c commit 2047d57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/utils/config/CategoryRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2047d57

Please # to comment.