From 28f0f8549c26576985a5a34c07ae571fb1d7a2f9 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 29 Oct 2021 19:45:46 +0200 Subject: [PATCH] Fixed an issue where the OptionList arrows would not get correctly centered vertically. --- es-core/src/components/OptionListComponent.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/es-core/src/components/OptionListComponent.h b/es-core/src/components/OptionListComponent.h index 181b8693a..509235ad1 100644 --- a/es-core/src/components/OptionListComponent.h +++ b/es-core/src/components/OptionListComponent.h @@ -91,11 +91,11 @@ public: mText.getFont()->getHeight()); // Position. - mLeftArrow.setPosition(0.0f, (mSize.y - mLeftArrow.getSize().y) / 2.0f); + mLeftArrow.setPosition(0.0f, std::round((mSize.y - mLeftArrow.getSize().y) / 2.0f)); mText.setPosition(mLeftArrow.getPosition().x + mLeftArrow.getSize().x, (mSize.y - mText.getSize().y) / 2.0f); mRightArrow.setPosition(mText.getPosition().x + mText.getSize().x, - (mSize.y - mRightArrow.getSize().y) / 2.0f); + std::round((mSize.y - mRightArrow.getSize().y) / 2.0f)); } bool input(InputConfig* config, Input input) override