Fixed an issue where the OptionList arrows would not get correctly centered vertically.

This commit is contained in:
Leon Styhre 2021-10-29 19:45:46 +02:00
parent 59839546a5
commit 28f0f8549c

View file

@ -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