mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Auto-hide floating zone window after last card removed from it
Reduce default size of zone windows slightly
This commit is contained in:
@@ -249,7 +249,7 @@ public class FloatingCardArea extends CardArea {
|
|||||||
}
|
}
|
||||||
//fallback default size
|
//fallback default size
|
||||||
FFrame mainFrame = Singletons.getView().getFrame();
|
FFrame mainFrame = Singletons.getView().getFrame();
|
||||||
window.setSize(mainFrame.getWidth() / 4, mainFrame.getHeight() * 2 / 3);
|
window.setSize(mainFrame.getWidth() / 5, mainFrame.getHeight() / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refresh() {
|
public void refresh() {
|
||||||
@@ -270,8 +270,16 @@ public class FloatingCardArea extends CardArea {
|
|||||||
cardPanels.add(cardPanel);
|
cardPanels.add(cardPanel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean hadCardPanels = getCardPanels().size() > 0;
|
||||||
setCardPanels(cardPanels);
|
setCardPanels(cardPanels);
|
||||||
window.setTitle(String.format(title, cardPanels.size()));
|
window.setTitle(String.format(title, cardPanels.size()));
|
||||||
|
|
||||||
|
//if window had cards and now doesn't, hide window
|
||||||
|
//(e.g. cast final card from Flashback zone)
|
||||||
|
if (hadCardPanels && cardPanels.size() == 0) {
|
||||||
|
window.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ You can still customize these by clicking on the phase stop indicator, and your
|
|||||||
- Zone Window Improvements -
|
- Zone Window Improvements -
|
||||||
Popup windows for zones (Hand, Library, Graveyard, Exile, Flashback) will now remember their position and size between sessions. Human and AI zones will each be remembered separately.
|
Popup windows for zones (Hand, Library, Graveyard, Exile, Flashback) will now remember their position and size between sessions. Human and AI zones will each be remembered separately.
|
||||||
Clicking the zone icon under a player's avatar will now hide the zone window if its currently open.
|
Clicking the zone icon under a player's avatar will now hide the zone window if its currently open.
|
||||||
|
After the last card is removed from a zone window, that window will now automatically be hidden. An example of this would be casting the last card in the Flashback zone.
|
||||||
|
Default size of zone windows has been slightly reduced.
|
||||||
|
|
||||||
---------
|
---------
|
||||||
New Cards
|
New Cards
|
||||||
|
|||||||
Reference in New Issue
Block a user