mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Fixed some graphical glitches in NinePatchComponent and ButtonComponent.
This commit is contained in:
parent
dbfab96e03
commit
440e089847
|
@ -133,6 +133,7 @@ void ButtonComponent::render(const glm::mat4& parentTrans)
|
|||
glm::vec3 centerOffset {(mSize.x - mTextCache->metrics.size.x) / 2.0f,
|
||||
(mSize.y - mTextCache->metrics.size.y) / 2.0f, 0.0f};
|
||||
trans = glm::translate(trans, centerOffset);
|
||||
trans[3] = glm::round(trans[3]);
|
||||
|
||||
if (Settings::getInstance()->getBool("DebugText")) {
|
||||
mRenderer->drawRect(centerOffset.x, 0.0f, mTextCache->metrics.size.x, mSize.y,
|
||||
|
|
|
@ -132,6 +132,7 @@ void NinePatchComponent::render(const glm::mat4& parentTrans)
|
|||
glm::mat4 trans {parentTrans * getTransform()};
|
||||
|
||||
if (mTexture && mVertices != nullptr) {
|
||||
trans[3] = glm::round(trans[3]);
|
||||
mRenderer->setMatrix(trans);
|
||||
mVertices->opacity = mOpacity;
|
||||
mTexture->bind();
|
||||
|
|
Loading…
Reference in a new issue