GUI, game: improved battlefield sizing (part of #6887 and #969):

- fixed wrong restore of card hint and chat panels;
- now it keep hidden state too (e.g. hidden card hint);
- reworked and share splitters code;
- removed some useless hotkeys to show/hide card hint panel;
This commit is contained in:
Oleg Agafonov 2024-08-13 23:49:39 +04:00
parent 3285f48aba
commit 58400833bc
8 changed files with 168 additions and 214 deletions

View file

@ -758,10 +758,11 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
public static void deactivate(MagePane frame) {
frame.setVisible(false);
setActive(getTopMost(frame));
if (activeFrame != frame) {
frame.deactivated();
MagePane topPane = getTopMost(frame);
if (topPane == frame) {
throw new IllegalArgumentException("Impossible use case - deactivated frame can't ref to itself");
}
setActive(topPane);
}
public static MagePane getTopMost(MagePane exclude) {