mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Merge branch 'master' into AI_ATTACK_TIMEOUT
This commit is contained in:
@@ -159,6 +159,7 @@ public class Forge implements ApplicationListener {
|
||||
public void create() {
|
||||
//install our error handler
|
||||
ExceptionHandler.registerErrorHandling();
|
||||
getDeviceAdapter().closeSplashScreen();
|
||||
|
||||
GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android);
|
||||
|
||||
@@ -257,8 +258,6 @@ public class Forge implements ApplicationListener {
|
||||
/* call preloadExtendedArt here, if we put it above we will *
|
||||
* get error: No OpenGL context found in the current thread. */
|
||||
preloadExtendedArt();
|
||||
// should be after create method but try to close this at a later time.
|
||||
getDeviceAdapter().closeSplashScreen();
|
||||
});
|
||||
};
|
||||
//see if app or assets need updating
|
||||
|
||||
@@ -149,16 +149,9 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
||||
listView = new ItemListView<>(this, model);
|
||||
imageView = createImageView(model);
|
||||
|
||||
if (Forge.isMobileAdventureMode) {
|
||||
// reversed default
|
||||
views.add(imageView);
|
||||
views.add(listView);
|
||||
currentView = imageView;
|
||||
} else {
|
||||
views.add(listView);
|
||||
views.add(imageView);
|
||||
currentView = listView;
|
||||
}
|
||||
views.add(listView);
|
||||
views.add(imageView);
|
||||
currentView = listView;
|
||||
btnView.setIcon(currentView.getIcon());
|
||||
|
||||
//build display
|
||||
|
||||
@@ -36,6 +36,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.TreeMap;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static forge.assets.FSkin.getDefaultSkinFile;
|
||||
@@ -1030,7 +1031,7 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
private boolean selected, deckSelectMode, showRanking;
|
||||
private final float IMAGE_SIZE = CardRenderer.MANA_SYMBOL_SIZE;
|
||||
private DeckProxy deckProxy = null;
|
||||
private StringBuffer colorID = new StringBuffer();
|
||||
private String colorID = null;
|
||||
private FImageComplex deckCover = null;
|
||||
private Texture dpImg = null;
|
||||
//private TextureRegion tr;
|
||||
@@ -1058,18 +1059,7 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
}
|
||||
}
|
||||
if (((PaperCard) item).getColorID() != null) {
|
||||
for (String s : ((PaperCard) item).getColorID()) {
|
||||
if ("white".equalsIgnoreCase(s))
|
||||
colorID.append("{W}");
|
||||
if ("green".equalsIgnoreCase(s))
|
||||
colorID.append("{G}");
|
||||
if ("red".equalsIgnoreCase(s))
|
||||
colorID.append("{R}");
|
||||
if ("blue".equalsIgnoreCase(s))
|
||||
colorID.append("{U}");
|
||||
if ("black".equalsIgnoreCase(s))
|
||||
colorID.append("{B}");
|
||||
}
|
||||
colorID = ((PaperCard) item).getColorID().stream().map(MagicColor::toSymbol).collect(Collectors.joining());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1153,8 +1143,8 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
}
|
||||
}
|
||||
// spire colors
|
||||
if (!colorID.isEmpty()) {
|
||||
textRenderer.drawText(g, colorID.toString(), FSkinFont.forHeight(w / 5), Color.WHITE, x, y + h / 4, w, h, y, h, false, Align.center, true);
|
||||
if (colorID != null && !colorID.isEmpty()) {
|
||||
textRenderer.drawText(g, colorID, FSkinFont.forHeight(w / 5), Color.WHITE, x, y + h / 4, w, h, y, h, false, Align.center, true);
|
||||
}
|
||||
} else if (item instanceof ConquestCommander) {
|
||||
CardRenderer.drawCard(g, ((ConquestCommander) item).getCard(), x, y, w, h, pos);
|
||||
|
||||
@@ -615,7 +615,13 @@ public class VPlayerPanel extends FContainer {
|
||||
private final VDisplayArea displayArea;
|
||||
|
||||
private InfoTab(FSkinImageInterface icon0, VDisplayArea displayArea0) {
|
||||
icon = icon0;
|
||||
// missing or invalid player infotab icon probably old theme or custom theme.
|
||||
if (icon0 == null) {
|
||||
System.err.println("Missing/Invalid VPlayerPanel icon for: " + displayArea0 + " , defaulting to blank icon. Check your theme/skin layout.");
|
||||
icon = FSkinImage.BLANK;
|
||||
} else {
|
||||
icon = icon0;
|
||||
}
|
||||
displayArea = displayArea0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user