mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge branch 'master' into 'master'
Upscaled logo & splashscreen for mobile forge See merge request core-developers/forge!3555
This commit is contained in:
@@ -27,7 +27,6 @@ import forge.game.keyword.Keyword;
|
|||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.SpellAbilityStackInstance;
|
import forge.game.spellability.SpellAbilityStackInstance;
|
||||||
import forge.game.trigger.TriggerType;
|
import forge.game.trigger.TriggerType;
|
||||||
import forge.game.zone.ZoneType;
|
|
||||||
import forge.util.CardTranslation;
|
import forge.util.CardTranslation;
|
||||||
import forge.util.collect.FCollection;
|
import forge.util.collect.FCollection;
|
||||||
import forge.util.collect.FCollectionView;
|
import forge.util.collect.FCollectionView;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ public class FSkin {
|
|||||||
private static FileHandle preferredDir;
|
private static FileHandle preferredDir;
|
||||||
private static String preferredName;
|
private static String preferredName;
|
||||||
private static boolean loaded = false;
|
private static boolean loaded = false;
|
||||||
|
public static Texture hdLogo = null;
|
||||||
|
|
||||||
public static void changeSkin(final String skinName) {
|
public static void changeSkin(final String skinName) {
|
||||||
final ForgePreferences prefs = FModel.getPreferences();
|
final ForgePreferences prefs = FModel.getPreferences();
|
||||||
@@ -124,6 +125,9 @@ public class FSkin {
|
|||||||
|
|
||||||
if (splashScreen != null) {
|
if (splashScreen != null) {
|
||||||
final FileHandle f = getSkinFile("bg_splash.png");
|
final FileHandle f = getSkinFile("bg_splash.png");
|
||||||
|
final FileHandle f2 = getSkinFile("bg_splash_hd.png"); //HD Splashscreen
|
||||||
|
final FileHandle f3 = getSkinFile("hd_logo.png");
|
||||||
|
|
||||||
if (!f.exists()) {
|
if (!f.exists()) {
|
||||||
if (!skinName.equals("default")) {
|
if (!skinName.equals("default")) {
|
||||||
FSkin.loadLight("default", splashScreen);
|
FSkin.loadLight("default", splashScreen);
|
||||||
@@ -136,7 +140,21 @@ public class FSkin {
|
|||||||
final int w = txSplash.getWidth();
|
final int w = txSplash.getWidth();
|
||||||
final int h = txSplash.getHeight();
|
final int h = txSplash.getHeight();
|
||||||
|
|
||||||
splashScreen.setBackground(new TextureRegion(txSplash, 0, 0, w, h - 100));
|
if (f2.exists()) {
|
||||||
|
Texture txSplashHD = new Texture(f2, true);
|
||||||
|
txSplashHD.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
||||||
|
splashScreen.setBackground(new TextureRegion(txSplashHD));
|
||||||
|
} else {
|
||||||
|
splashScreen.setBackground(new TextureRegion(txSplash, 0, 0, w, h - 100));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (f3.exists()) {
|
||||||
|
Texture txOverlay = new Texture(f3, true);
|
||||||
|
txOverlay.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
||||||
|
hdLogo = txOverlay;
|
||||||
|
} else {
|
||||||
|
hdLogo = null;
|
||||||
|
}
|
||||||
|
|
||||||
Pixmap pxSplash = new Pixmap(f);
|
Pixmap pxSplash = new Pixmap(f);
|
||||||
FProgressBar.BACK_COLOR = new Color(pxSplash.getPixel(25, h - 75));
|
FProgressBar.BACK_COLOR = new Color(pxSplash.getPixel(25, h - 75));
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.badlogic.gdx.utils.Align;
|
|||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.Forge;
|
import forge.Forge;
|
||||||
import forge.Graphics;
|
import forge.Graphics;
|
||||||
|
import forge.assets.FSkin;
|
||||||
import forge.assets.FSkinColor;
|
import forge.assets.FSkinColor;
|
||||||
import forge.assets.FSkinColor.Colors;
|
import forge.assets.FSkinColor.Colors;
|
||||||
import forge.assets.FSkinFont;
|
import forge.assets.FSkinFont;
|
||||||
@@ -101,7 +102,10 @@ public class LoadingOverlay extends FOverlay {
|
|||||||
g.fillRect(BACK_COLOR, x, y, panelWidth, panelHeight);
|
g.fillRect(BACK_COLOR, x, y, panelWidth, panelHeight);
|
||||||
g.drawRect(Utils.scale(2), FORE_COLOR, x, y, panelWidth, panelHeight);
|
g.drawRect(Utils.scale(2), FORE_COLOR, x, y, panelWidth, panelHeight);
|
||||||
y += padding;
|
y += padding;
|
||||||
g.drawImage(FSkinImage.LOGO, (getWidth() - logoSize) / 2f, y, logoSize, logoSize);
|
if (FSkin.hdLogo == null)
|
||||||
|
g.drawImage(FSkinImage.LOGO, (getWidth() - logoSize) / 2f, y, logoSize, logoSize);
|
||||||
|
else
|
||||||
|
g.drawImage(FSkin.hdLogo, (getWidth() - logoSize) / 2f, y, logoSize, logoSize);
|
||||||
y += logoSize + padding;
|
y += logoSize + padding;
|
||||||
g.drawText(caption, FONT, FORE_COLOR, x, y, panelWidth, getHeight(), false, Align.center, false);
|
g.drawText(caption, FONT, FORE_COLOR, x, y, panelWidth, getHeight(), false, Align.center, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import java.util.List;
|
|||||||
import com.badlogic.gdx.utils.Align;
|
import com.badlogic.gdx.utils.Align;
|
||||||
import forge.Forge;
|
import forge.Forge;
|
||||||
import forge.Graphics;
|
import forge.Graphics;
|
||||||
|
import forge.assets.FImage;
|
||||||
|
import forge.assets.FSkin;
|
||||||
import forge.assets.FSkinColor;
|
import forge.assets.FSkinColor;
|
||||||
import forge.assets.FSkinColor.Colors;
|
import forge.assets.FSkinColor.Colors;
|
||||||
import forge.assets.FSkinImage;
|
import forge.assets.FSkinImage;
|
||||||
@@ -32,7 +34,26 @@ public class HomeScreen extends FScreen {
|
|||||||
|
|
||||||
public static final HomeScreen instance = new HomeScreen();
|
public static final HomeScreen instance = new HomeScreen();
|
||||||
|
|
||||||
private final FLabel lblLogo = add(new FLabel.Builder().icon(FSkinImage.LOGO).iconInBackground().iconScaleFactor(1).build());
|
private final FLabel lblLogo = add(new FLabel.Builder().icon(
|
||||||
|
new FImage() {
|
||||||
|
final float size = Forge.getScreenWidth() * 0.6f;
|
||||||
|
@Override
|
||||||
|
public float getWidth() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public float getHeight() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void draw(Graphics g, float x, float y, float w, float h) {
|
||||||
|
if (FSkin.hdLogo == null)
|
||||||
|
FSkinImage.LOGO.draw(g, x, y, w, h);
|
||||||
|
else
|
||||||
|
g.drawImage(FSkin.hdLogo, x, y, w, h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
).iconInBackground().iconScaleFactor(1).build());
|
||||||
private final ButtonScroller buttonScroller = add(new ButtonScroller());
|
private final ButtonScroller buttonScroller = add(new ButtonScroller());
|
||||||
private final List<MenuButton> buttons = new ArrayList<>();
|
private final List<MenuButton> buttons = new ArrayList<>();
|
||||||
private int activeButtonIndex, baseButtonCount;
|
private int activeButtonIndex, baseButtonCount;
|
||||||
|
|||||||
BIN
forge-gui/res/skins/darkforge/bg_splash_hd.png
Normal file
BIN
forge-gui/res/skins/darkforge/bg_splash_hd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
BIN
forge-gui/res/skins/darkforge/hd_logo.png
Normal file
BIN
forge-gui/res/skins/darkforge/hd_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 323 KiB |
BIN
forge-gui/res/skins/default/bg_splash_hd.png
Normal file
BIN
forge-gui/res/skins/default/bg_splash_hd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
BIN
forge-gui/res/skins/default/hd_logo.png
Normal file
BIN
forge-gui/res/skins/default/hd_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 320 KiB |
Reference in New Issue
Block a user