diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index b6178ff46..9be125af2 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -299,7 +299,7 @@ void ComponentList::render(const glm::mat4& parentTrans) glm::ivec2 {clipRectSizeX, clipRectSizeY}); // Scroll the camera. - trans = glm::translate(trans, glm::vec3 {0.0f, std::round(-mCameraOffset), 0.0f}); + trans = glm::translate(trans, glm::vec3 {0.0f, -mCameraOffset, 0.0f}); glm::mat4 loopTrans {trans}; @@ -382,14 +382,14 @@ void ComponentList::render(const glm::mat4& parentTrans) const float selectedRowHeight {getRowHeight(mEntries.at(mCursor).data)}; if (mOpacity == 1.0f) { - mRenderer->drawRect(0.0f, mSelectorBarOffset, std::round(mSize.x), selectedRowHeight, - 0xFFFFFFFF, 0xFFFFFFFF, false, mOpacity, mDimming, + mRenderer->drawRect(0.0f, mSelectorBarOffset, mSize.x, selectedRowHeight, 0xFFFFFFFF, + 0xFFFFFFFF, false, mOpacity, mDimming, Renderer::BlendFactor::ONE_MINUS_DST_COLOR, Renderer::BlendFactor::ZERO); - mRenderer->drawRect(0.0f, mSelectorBarOffset, std::round(mSize.x), selectedRowHeight, - 0x777777FF, 0x777777FF, false, mOpacity, mDimming, - Renderer::BlendFactor::ONE, Renderer::BlendFactor::ONE); + mRenderer->drawRect(0.0f, mSelectorBarOffset, mSize.x, selectedRowHeight, 0x777777FF, + 0x777777FF, false, mOpacity, mDimming, Renderer::BlendFactor::ONE, + Renderer::BlendFactor::ONE); } for (auto it = drawAfterCursor.cbegin(); it != drawAfterCursor.cend(); ++it) @@ -403,14 +403,13 @@ void ComponentList::render(const glm::mat4& parentTrans) // Draw separators. float y {0.0f}; for (unsigned int i = 0; i < mEntries.size(); ++i) { - mRenderer->drawRect(0.0f, y, std::round(mSize.x), - 1.0f * Renderer::getScreenHeightModifier(), 0xC6C7C6FF, 0xC6C7C6FF, - false, mOpacity, mDimming); + mRenderer->drawRect(0.0f, y, mSize.x, 1.0f * Renderer::getScreenHeightModifier(), + 0xC6C7C6FF, 0xC6C7C6FF, false, mOpacity, mDimming); y += getRowHeight(mEntries.at(i).data); } - mRenderer->drawRect(0.0f, y, std::round(mSize.x), 1.0f * Renderer::getScreenHeightModifier(), - 0xC6C7C6FF, 0xC6C7C6FF, false, mOpacity, mDimming); + mRenderer->drawRect(0.0f, y, mSize.x, 1.0f * Renderer::getScreenHeightModifier(), 0xC6C7C6FF, + 0xC6C7C6FF, false, mOpacity, mDimming); mRenderer->popClipRect(); } diff --git a/es-core/src/components/MenuComponent.cpp b/es-core/src/components/MenuComponent.cpp index a0cd27c2e..0fe271e19 100644 --- a/es-core/src/components/MenuComponent.cpp +++ b/es-core/src/components/MenuComponent.cpp @@ -113,7 +113,7 @@ void MenuComponent::updateSize() void MenuComponent::onSizeChanged() { - mBackground.fitTo(mSize, glm::vec3 {}, glm::vec2 {-32.0f, -32.0f}); + mBackground.fitTo(mSize, glm::vec3 {0.0f, 0.0f, 0.0f}, glm::vec2 {-32.0f, -32.0f}); // Update grid row/column sizes. mGrid.setRowHeightPerc(0, TITLE_HEIGHT / mSize.y / 2.0f); @@ -131,7 +131,7 @@ void MenuComponent::onSizeChanged() mTitle->setSize(titleSize.x - indicatorsSize, titleSize.y); glm::vec3 titlePos {mTitle->getPosition()}; - mTitle->setPosition(titlePos.x + std::round(indicatorsSize / 2.0f), titlePos.y, titlePos.z); + mTitle->setPosition(titlePos.x + indicatorsSize / 2.0f, titlePos.y, titlePos.z); } void MenuComponent::addButton(const std::string& name, diff --git a/es-core/src/components/NinePatchComponent.cpp b/es-core/src/components/NinePatchComponent.cpp index 39e438ac6..f70251f25 100644 --- a/es-core/src/components/NinePatchComponent.cpp +++ b/es-core/src/components/NinePatchComponent.cpp @@ -60,9 +60,8 @@ void NinePatchComponent::buildVertices() else { // Scale the corner size relative to the screen resolution (using the medium sized // default font as size reference). - relCornerSize = - glm::round(mCornerSize * (Font::get(FONT_SIZE_MEDIUM)->getLetterHeight() * - (mSharpCorners == true ? 0.0568f : 0.09f) / 2.0f)); + relCornerSize = mCornerSize * (Font::get(FONT_SIZE_MEDIUM)->getLetterHeight() * + (mSharpCorners == true ? 0.0568f : 0.09f) / 2.0f); } glm::vec2 texSize {relCornerSize * 3.0f};