From 33e26c1ad2c4a915f2c883002df576772a786790 Mon Sep 17 00:00:00 2001 From: Jetz72 Date: Fri, 3 Jan 2025 10:47:56 -0800 Subject: [PATCH] Fix alt zone display having the zones on opposite sides of the screen. (#6742) --- .../src/forge/screens/match/views/VPlayerPanel.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java b/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java index 3833cc4d48f..5e6cba4eda2 100644 --- a/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java +++ b/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java @@ -408,7 +408,7 @@ private void doLandscapeLayout(float width, float height) { tab.setBounds(x, y, infoTabWidth, infoTabHeight); y += infoTabHeight; } else { - if (tab.getUseAltDisplay()) { + if (!tab.isAlignedRightForAltDisplay()) { tab.setBounds(x, y, infoTabWidth, infoTabHeight); y += infoTabHeight; } else { @@ -670,7 +670,7 @@ protected boolean isSelected() { protected FSkinColor getSelectedBackgroundColor() { return getDisplayAreaBackColor(); } - protected boolean getUseAltDisplay() { + protected boolean isAlignedRightForAltDisplay() { return false; } @@ -678,7 +678,7 @@ protected boolean getUseAltDisplay() { public void draw(Graphics g) { float x, y, w, h; boolean drawOverlay = MatchController.getView().selectedPlayerPanel().getPlayer() == player && Forge.hasGamepad(); - if (Forge.altZoneTabs && this.getUseAltDisplay()) { + if (Forge.altZoneTabs && this.isAlignedRightForAltDisplay()) { //draw extra g.fillRect(FSkinColor.get(Forge.isMobileAdventureMode ? Colors.ADV_CLR_THEME2 : Colors.CLR_THEME2), 0, 0, getWidth(), getHeight()); if (isSelected()) { @@ -842,7 +842,7 @@ private InfoTabZone(VDisplayArea displayArea, ZoneType zoneType) { } private final EnumSet altDisplayZones = EnumSet.of(ZoneType.Hand, ZoneType.Library, ZoneType.Graveyard, ZoneType.Exile); - public boolean getUseAltDisplay() { + public boolean isAlignedRightForAltDisplay() { return altDisplayZones.contains(this.zoneType); }