Skip to content

Commit

Permalink
Fix alt zone display having the zones on opposite sides of the screen. (
Browse files Browse the repository at this point in the history
  • Loading branch information
Jetz72 authored Jan 3, 2025
1 parent 29245cd commit 33e26c1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -670,15 +670,15 @@ protected boolean isSelected() {
protected FSkinColor getSelectedBackgroundColor() {
return getDisplayAreaBackColor();
}
protected boolean getUseAltDisplay() {
protected boolean isAlignedRightForAltDisplay() {
return false;
}

@Override
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()) {
Expand Down Expand Up @@ -842,7 +842,7 @@ private InfoTabZone(VDisplayArea displayArea, ZoneType zoneType) {
}

private final EnumSet<ZoneType> altDisplayZones = EnumSet.of(ZoneType.Hand, ZoneType.Library, ZoneType.Graveyard, ZoneType.Exile);
public boolean getUseAltDisplay() {
public boolean isAlignedRightForAltDisplay() {
return altDisplayZones.contains(this.zoneType);
}

Expand Down

0 comments on commit 33e26c1

Please sign in to comment.