mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 20:15:38 +00:00
Improved the NinePatchComponent corner sizing for screens in portrait orientation.
This commit is contained in:
parent
063ffd7195
commit
1c79723894
|
@ -54,7 +54,9 @@ void NinePatchComponent::buildVertices()
|
|||
delete[] mVertices;
|
||||
|
||||
// Scale the corner size relative to the screen resolution.
|
||||
glm::vec2 relCornerSize = glm::round(mCornerSize * Renderer::getScreenHeightModifier());
|
||||
glm::vec2 relCornerSize = glm::round(
|
||||
mCornerSize *
|
||||
((Renderer::getScreenHeightModifier() + Renderer::getScreenWidthModifier()) / 2.0f));
|
||||
|
||||
mTexture = TextureResource::get(mPath, false, false, false);
|
||||
glm::vec2 texSize = relCornerSize * 3.0f;
|
||||
|
|
Loading…
Reference in a new issue