update check

This commit is contained in:
Anthony Calosa
2022-08-01 09:47:42 +08:00
parent 9266183cd9
commit b3e4e4013f

View File

@@ -217,12 +217,6 @@ public class RewardScene extends UIScene {
int y = Forge.getDeviceAdapter().getRealScreenSize(false).getRight(); int y = Forge.getDeviceAdapter().getRealScreenSize(false).getRight();
int realX = Forge.getDeviceAdapter().getRealScreenSize(true).getLeft(); int realX = Forge.getDeviceAdapter().getRealScreenSize(true).getLeft();
int realY = Forge.getDeviceAdapter().getRealScreenSize(true).getRight(); int realY = Forge.getDeviceAdapter().getRealScreenSize(true).getRight();
if (realX > x || realY > y) {
if (x > y)
x *= 1.1f;
else
y *= 1.1f;
}
float fW = x > y ? x : y; float fW = x > y ? x : y;
float fH = x > y ? y : x; float fH = x > y ? y : x;
float mul = fW/fH < AR ? AR/(fW/fH) : (fW/fH)/AR; float mul = fW/fH < AR ? AR/(fW/fH) : (fW/fH)/AR;
@@ -234,6 +228,9 @@ public class RewardScene extends UIScene {
mul *= 0.8f; mul *= 0.8f;
} }
cardHeight = bestCardHeight * 0.90f ; cardHeight = bestCardHeight * 0.90f ;
if (realX > x || realY > y) {
mul *= Forge.isLandscapeMode() ? 0.9f : 1.1f;
}
cardWidth = (cardHeight / CARD_WIDTH_TO_HEIGHT)*mul; cardWidth = (cardHeight / CARD_WIDTH_TO_HEIGHT)*mul;
yOff += (targetHeight - (cardHeight * numberOfRows)) / 2f; yOff += (targetHeight - (cardHeight * numberOfRows)) / 2f;