mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
adjust tooltips for screens without navigation menu
This commit is contained in:
@@ -230,6 +230,13 @@ public class RewardScene extends UIScene {
|
|||||||
cardHeight = bestCardHeight * 0.90f ;
|
cardHeight = bestCardHeight * 0.90f ;
|
||||||
if (realX > x || realY > y) {
|
if (realX > x || realY > y) {
|
||||||
mul *= Forge.isLandscapeMode() ? 0.95f : 1.05f;
|
mul *= Forge.isLandscapeMode() ? 0.95f : 1.05f;
|
||||||
|
} else {
|
||||||
|
//immersive | no navigation and/or showing cutout cam
|
||||||
|
if (fW/fH > 2.3f)
|
||||||
|
mul *= Forge.isLandscapeMode() ? 1.1f : 1.5f;
|
||||||
|
else if (fW/fH > 2f)
|
||||||
|
mul *= Forge.isLandscapeMode() ? 1.1f : 1.3f;
|
||||||
|
|
||||||
}
|
}
|
||||||
cardWidth = (cardHeight / CARD_WIDTH_TO_HEIGHT)*mul;
|
cardWidth = (cardHeight / CARD_WIDTH_TO_HEIGHT)*mul;
|
||||||
|
|
||||||
|
|||||||
@@ -353,13 +353,21 @@ public class RewardActor extends Actor implements Disposable, ImageFetcher.Callb
|
|||||||
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();
|
||||||
|
float fW = x > y ? x : y;
|
||||||
|
float fH = x > y ? y : x;
|
||||||
if (realX > x) {
|
if (realX > x) {
|
||||||
x *= 1.1f;
|
x *= 1.1f;
|
||||||
} else if (realY > y) {
|
} else if (realY > y) {
|
||||||
y *= 1.1f;
|
y *= 1.1f;
|
||||||
|
} else {
|
||||||
|
if (fW/fH > 2f) {
|
||||||
|
//immersive | no navigation and showing cutout cam
|
||||||
|
if (Forge.isLandscapeMode())
|
||||||
|
x *= 1.3f;
|
||||||
|
else
|
||||||
|
y *= 1.5f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
float fW = x > y ? x : y;
|
|
||||||
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;
|
||||||
if (fW/fH >= 2f) {//tall display
|
if (fW/fH >= 2f) {//tall display
|
||||||
mul = (fW/fH) - ((fW/fH)/AR);
|
mul = (fW/fH) - ((fW/fH)/AR);
|
||||||
|
|||||||
Reference in New Issue
Block a user