v3.2.3: initial overhaul to inset functionality for edge-to-edge

This commit is contained in:
Evan Debenham
2025-08-29 14:36:24 -04:00
parent 0630d65cc6
commit 09f5948aa2
23 changed files with 376 additions and 175 deletions

View File

@@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.watabou.input.ControllerHandler;
import com.watabou.noosa.Game;
import com.watabou.utils.PlatformSupport;
import com.watabou.utils.RectF;
import org.robovm.apple.audiotoolbox.AudioServices;
import org.robovm.apple.systemconfiguration.SCNetworkReachability;
@@ -63,6 +64,16 @@ public class IOSPlatformSupport extends PlatformSupport {
return false;
}
@Override
public RectF getSafeInsets(int level) {
//TODO currently returns all insets all the time. Needs testing based on particular iOS quirks
// we roughly want:
// ignore bottom home indicator insets in fullsceen
// ignore side insets in landscape for side that isn't notch
// older notch is large, compact dynamic island is not (maybe? Probably need UI adjustments then)
return super.getSafeInsets(level);
}
@Override
public void updateSystemUI() {
int prevInset = Game.bottomInset;