mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix loading overlay for desktop game
This commit is contained in:
@@ -442,6 +442,7 @@ public enum FControl implements KeyEventDispatcher {
|
|||||||
match.startGame(newGame);
|
match.startGame(newGame);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
SOverlayUtils.hideOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void endCurrentGame() {
|
public final void endCurrentGame() {
|
||||||
@@ -587,7 +588,6 @@ public enum FControl implements KeyEventDispatcher {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
startGameWithUi(mc);
|
startGameWithUi(mc);
|
||||||
SOverlayUtils.hideOverlay();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,18 +35,21 @@ public final class SOverlayUtils {
|
|||||||
final int h = overlay.getHeight();
|
final int h = overlay.getHeight();
|
||||||
final int pnlW = 400;
|
final int pnlW = 400;
|
||||||
final int pnlH = 300;
|
final int pnlH = 300;
|
||||||
|
final int labelHeight = 50;
|
||||||
|
final int logoSize = pnlH - labelHeight;
|
||||||
|
|
||||||
// Adds the "loading" panel to generic overlay container
|
// Adds the "loading" panel to generic overlay container
|
||||||
// (which is preset with null layout and close button)
|
// (which is preset with null layout and close button)
|
||||||
final FPanel pnl = new FPanel();
|
final FPanel pnl = new FPanel();
|
||||||
pnl.setLayout(new MigLayout("insets 0, gap 0, ax center, wrap"));
|
pnl.setLayout(new MigLayout("insets 0, gap 0, ax center, wrap"));
|
||||||
pnl.setBackground(FSkin.getColor(FSkin.Colors.CLR_ACTIVE));
|
pnl.setBackground(FSkin.getColor(FSkin.Colors.CLR_ACTIVE).alphaColor(191));
|
||||||
pnl.setBounds(new Rectangle(((w - pnlW) / 2), ((h - pnlH) / 2), pnlW, pnlH));
|
pnl.setBounds(new Rectangle(((w - pnlW) / 2), ((h - pnlH) / 2), pnlW, pnlH));
|
||||||
|
|
||||||
pnl.add(new FLabel.Builder().icon(FSkin.getIcon(FSkinProp.ICO_LOGO)).build(),
|
pnl.add(new FLabel.Builder().icon(FSkin.getIcon(FSkinProp.ICO_LOGO))
|
||||||
"h 200px!, align center");
|
.iconScaleFactor(1d).iconInBackground().build(),
|
||||||
|
"w " + logoSize + "px!, h " + logoSize + "px!, align center");
|
||||||
pnl.add(new FLabel.Builder().text("Loading new game...")
|
pnl.add(new FLabel.Builder().text("Loading new game...")
|
||||||
.fontSize(22).build(), "h 40px!, align center");
|
.fontSize(22).build(), "h " + labelHeight + "px!, align center");
|
||||||
|
|
||||||
overlay.add(pnl);
|
overlay.add(pnl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ Support renaming gauntlets.
|
|||||||
Support sorting gauntlets (and quests) case insensitive.
|
Support sorting gauntlets (and quests) case insensitive.
|
||||||
|
|
||||||
|
|
||||||
|
- Fixed loading overlay to show logo properly and have some transparency -
|
||||||
|
|
||||||
|
|
||||||
---------
|
---------
|
||||||
New Cards
|
New Cards
|
||||||
---------
|
---------
|
||||||
|
|||||||
Reference in New Issue
Block a user