Adapt interface to display notch of mac laptops (#8666)

* Adapt interface to display notch of mac laptops

* `macNotchHeight` as a separate variable, and description for mac notch setting
This commit is contained in:
Alex Gusev
2023-06-04 22:43:07 +06:00
committed by GitHub
parent 97a603204b
commit 32c146cdf1
39 changed files with 365 additions and 281 deletions

View File

@@ -100,6 +100,9 @@ public class MenuFragment{
float fx = (int)(width / 2f);
float fy = (int)(height - 6 - logoh) + logoh / 2 - (Core.graphics.isPortrait() ? Scl.scl(30f) : 0f);
if(Core.settings.getBool("macnotch") ){
fy -= Scl.scl(macNotchHeight);
}
Draw.color();
Draw.rect(logo, fx, fy, logow, logoh);
@@ -277,7 +280,7 @@ public class MenuFragment{
addButton(text, Styles.none, callback);
}
/**
/**
* Adds a custom button to the menu.
* If {@link MenuButton#submenu} is null or the player is on mobile, {@link MenuButton#runnable} is invoked on click.
* Otherwise, {@link MenuButton#submenu} is shown.