mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Refactor FSkin to use Assetmanager
This commit is contained in:
@@ -104,8 +104,8 @@ public class Forge implements ApplicationListener {
|
|||||||
public static boolean enablePreloadExtendedArt = false;
|
public static boolean enablePreloadExtendedArt = false;
|
||||||
public static boolean isTabletDevice = false;
|
public static boolean isTabletDevice = false;
|
||||||
public static String locale = "en-US";
|
public static String locale = "en-US";
|
||||||
public Assets cardAssets = new Assets();
|
public Assets cardAssets;
|
||||||
public Assets otherAssets = new Assets();
|
public Assets otherAssets;
|
||||||
public static boolean hdbuttons = false;
|
public static boolean hdbuttons = false;
|
||||||
public static boolean hdstart = false;
|
public static boolean hdstart = false;
|
||||||
public static boolean isPortraitMode = false;
|
public static boolean isPortraitMode = false;
|
||||||
@@ -166,7 +166,8 @@ public class Forge implements ApplicationListener {
|
|||||||
// don't allow to read and process
|
// don't allow to read and process
|
||||||
ForgeConstants.SPRITE_CARDBG_FILE = "";
|
ForgeConstants.SPRITE_CARDBG_FILE = "";
|
||||||
}
|
}
|
||||||
|
cardAssets = new Assets();
|
||||||
|
otherAssets = new Assets();
|
||||||
graphics = new Graphics();
|
graphics = new Graphics();
|
||||||
splashScreen = new SplashScreen();
|
splashScreen = new SplashScreen();
|
||||||
frameRate = new FrameRate();
|
frameRate = new FrameRate();
|
||||||
@@ -219,50 +220,44 @@ public class Forge implements ApplicationListener {
|
|||||||
ImageCache.initCache(cacheSize);
|
ImageCache.initCache(cacheSize);
|
||||||
|
|
||||||
//load model on background thread (using progress bar to report progress)
|
//load model on background thread (using progress bar to report progress)
|
||||||
FThreads.invokeInBackgroundThread(new Runnable() {
|
FThreads.invokeInBackgroundThread(() -> {
|
||||||
@Override
|
//see if app or assets need updating
|
||||||
public void run() {
|
AssetsDownloader.checkForUpdates(splashScreen, enableSentry, locale);
|
||||||
//see if app or assets need updating
|
if (exited) {
|
||||||
AssetsDownloader.checkForUpdates(splashScreen);
|
return;
|
||||||
if (exited) {
|
} //don't continue if user chose to exit or couldn't download required assets
|
||||||
return;
|
|
||||||
} //don't continue if user chose to exit or couldn't download required assets
|
|
||||||
|
|
||||||
safeToClose = false;
|
safeToClose = false;
|
||||||
ImageKeys.setIsLibGDXPort(GuiBase.getInterface().isLibgdxPort());
|
ImageKeys.setIsLibGDXPort(GuiBase.getInterface().isLibgdxPort());
|
||||||
FModel.initialize(splashScreen.getProgressBar(), null);
|
FModel.initialize(splashScreen.getProgressBar(), null);
|
||||||
|
|
||||||
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblLoadingFonts"));
|
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblLoadingFonts"));
|
||||||
FSkinFont.preloadAll(locale);
|
FSkinFont.preloadAll(locale);
|
||||||
|
|
||||||
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblLoadingCardTranslations"));
|
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblLoadingCardTranslations"));
|
||||||
CardTranslation.preloadTranslation(locale, ForgeConstants.LANG_DIR);
|
CardTranslation.preloadTranslation(locale, ForgeConstants.LANG_DIR);
|
||||||
|
|
||||||
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblFinishingStartup"));
|
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblFinishingStartup"));
|
||||||
|
|
||||||
//add reminder to preload
|
//add reminder to preload
|
||||||
if (enablePreloadExtendedArt) {
|
if (enablePreloadExtendedArt) {
|
||||||
if (autoCache)
|
if (autoCache)
|
||||||
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblPreloadExtendedArt") + "\nDetected RAM: " + totalDeviceRAM + "MB. Cache size: " + cacheSize);
|
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblPreloadExtendedArt") + "\nDetected RAM: " + totalDeviceRAM + "MB. Cache size: " + cacheSize);
|
||||||
else
|
else
|
||||||
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblPreloadExtendedArt"));
|
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblPreloadExtendedArt"));
|
||||||
} else {
|
} else {
|
||||||
if (autoCache)
|
if (autoCache)
|
||||||
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblFinishingStartup") + "\nDetected RAM: " + totalDeviceRAM + "MB. Cache size: " + cacheSize);
|
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblFinishingStartup") + "\nDetected RAM: " + totalDeviceRAM + "MB. Cache size: " + cacheSize);
|
||||||
else
|
else
|
||||||
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblFinishingStartup"));
|
splashScreen.getProgressBar().setDescription(getLocalizer().getMessage("lblFinishingStartup"));
|
||||||
}
|
|
||||||
|
|
||||||
Gdx.app.postRunnable(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
afterDbLoaded();
|
|
||||||
/* call preloadExtendedArt here, if we put it above we will *
|
|
||||||
* get error: No OpenGL context found in the current thread. */
|
|
||||||
preloadExtendedArt();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Gdx.app.postRunnable(() -> {
|
||||||
|
afterDbLoaded();
|
||||||
|
/* call preloadExtendedArt here, if we put it above we will *
|
||||||
|
* get error: No OpenGL context found in the current thread. */
|
||||||
|
preloadExtendedArt();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,52 +375,35 @@ public class Forge implements ApplicationListener {
|
|||||||
FModel.getPreferences().save();
|
FModel.getPreferences().save();
|
||||||
}
|
}
|
||||||
|
|
||||||
FThreads.invokeInBackgroundThread(new Runnable() {
|
FThreads.invokeInBackgroundThread(() -> FThreads.invokeInEdtLater(() -> {
|
||||||
@Override
|
//load skin full
|
||||||
public void run() {
|
FSkin.loadFull(splashScreen);
|
||||||
FThreads.invokeInEdtLater(new Runnable() {
|
FThreads.invokeInBackgroundThread(() -> {
|
||||||
@Override
|
//load Drafts
|
||||||
public void run() {
|
preloadBoosterDrafts();
|
||||||
//load skin full
|
FThreads.invokeInEdtLater(() -> {
|
||||||
FSkin.loadFull(splashScreen);
|
//selection transition
|
||||||
FThreads.invokeInBackgroundThread(new Runnable() {
|
setTransitionScreen(new TransitionScreen(() -> {
|
||||||
@Override
|
if (selector.equals("Classic")) {
|
||||||
public void run() {
|
openHomeDefault();
|
||||||
//load Drafts
|
clearSplashScreen();
|
||||||
preloadBoosterDrafts();
|
} else if (selector.equals("Adventure")) {
|
||||||
FThreads.invokeInEdtLater(new Runnable() {
|
openAdventure();
|
||||||
@Override
|
clearSplashScreen();
|
||||||
public void run() {
|
} else if (splashScreen != null) {
|
||||||
//selection transition
|
splashScreen.setShowModeSelector(true);
|
||||||
setTransitionScreen(new TransitionScreen(new Runnable() {
|
} else {//default mode in case splashscreen is null at some point as seen on resume..
|
||||||
@Override
|
openHomeDefault();
|
||||||
public void run() {
|
clearSplashScreen();
|
||||||
if (selector.equals("Classic")) {
|
}
|
||||||
openHomeDefault();
|
//start background music
|
||||||
clearSplashScreen();
|
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS);
|
||||||
} else if (selector.equals("Adventure")) {
|
safeToClose = true;
|
||||||
openAdventure();
|
clearTransitionScreen();
|
||||||
clearSplashScreen();
|
}, Forge.takeScreenshot(), false, false, true, false));
|
||||||
} else if (splashScreen != null) {
|
|
||||||
splashScreen.setShowModeSelector(true);
|
|
||||||
} else {//default mode in case splashscreen is null at some point as seen on resume..
|
|
||||||
openHomeDefault();
|
|
||||||
clearSplashScreen();
|
|
||||||
}
|
|
||||||
//start background music
|
|
||||||
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS);
|
|
||||||
safeToClose = true;
|
|
||||||
clearTransitionScreen();
|
|
||||||
}
|
|
||||||
}, Forge.takeScreenshot(), false, false, true, false));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setCursor(TextureRegion textureRegion, String name) {
|
public static void setCursor(TextureRegion textureRegion, String name) {
|
||||||
@@ -757,32 +735,26 @@ public class Forge implements ApplicationListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void switchToClassic() {
|
public static void switchToClassic() {
|
||||||
setTransitionScreen(new TransitionScreen(new Runnable() {
|
setTransitionScreen(new TransitionScreen(() -> {
|
||||||
@Override
|
ImageCache.disposeTextures();
|
||||||
public void run() {
|
isMobileAdventureMode = false;
|
||||||
ImageCache.disposeTextures();
|
GuiBase.setIsAdventureMode(false);
|
||||||
isMobileAdventureMode = false;
|
setCursor(FSkin.getCursor().get(0), "0");
|
||||||
GuiBase.setIsAdventureMode(false);
|
altZoneTabs = FModel.getPreferences().getPrefBoolean(FPref.UI_ALT_PLAYERZONETABS);
|
||||||
setCursor(FSkin.getCursor().get(0), "0");
|
Gdx.input.setInputProcessor(getInputProcessor());
|
||||||
altZoneTabs = FModel.getPreferences().getPrefBoolean(FPref.UI_ALT_PLAYERZONETABS);
|
clearTransitionScreen();
|
||||||
Gdx.input.setInputProcessor(getInputProcessor());
|
openHomeDefault();
|
||||||
clearTransitionScreen();
|
exited = false;
|
||||||
openHomeDefault();
|
|
||||||
exited = false;
|
|
||||||
}
|
|
||||||
}, Forge.takeScreenshot(), false, false));
|
}, Forge.takeScreenshot(), false, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void switchToAdventure() {
|
public static void switchToAdventure() {
|
||||||
setTransitionScreen(new TransitionScreen(new Runnable() {
|
setTransitionScreen(new TransitionScreen(() -> {
|
||||||
@Override
|
ImageCache.disposeTextures();
|
||||||
public void run() {
|
clearCurrentScreen();
|
||||||
ImageCache.disposeTextures();
|
clearTransitionScreen();
|
||||||
clearCurrentScreen();
|
openAdventure();
|
||||||
clearTransitionScreen();
|
exited = false;
|
||||||
openAdventure();
|
|
||||||
exited = false;
|
|
||||||
}
|
|
||||||
}, null, false, true));
|
}, null, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -936,19 +908,11 @@ public class Forge implements ApplicationListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void delayedSwitchBack() {
|
public static void delayedSwitchBack() {
|
||||||
FThreads.invokeInBackgroundThread(new Runnable() {
|
FThreads.invokeInBackgroundThread(() -> FThreads.invokeInEdtLater(() -> {
|
||||||
@Override
|
clearTransitionScreen();
|
||||||
public void run() {
|
clearCurrentScreen();
|
||||||
FThreads.invokeInEdtLater(new Runnable() {
|
switchToLast();
|
||||||
@Override
|
}));
|
||||||
public void run() {
|
|
||||||
clearTransitionScreen();
|
|
||||||
clearCurrentScreen();
|
|
||||||
switchToLast();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -990,8 +954,8 @@ public class Forge implements ApplicationListener {
|
|||||||
currentScreen.onClose(null);
|
currentScreen.onClose(null);
|
||||||
currentScreen = null;
|
currentScreen = null;
|
||||||
}
|
}
|
||||||
ImageCache.disposeTextureManager();
|
cardAssets.dispose();
|
||||||
Config.instance().disposeTextureAtlasManager();
|
otherAssets.dispose();
|
||||||
Dscreens.clear();
|
Dscreens.clear();
|
||||||
graphics.dispose();
|
graphics.dispose();
|
||||||
SoundSystem.instance.dispose();
|
SoundSystem.instance.dispose();
|
||||||
@@ -1000,7 +964,15 @@ public class Forge implements ApplicationListener {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/** Retrieve assets.
|
||||||
|
* @param other if set to true returns otherAssets otherwise returns cardAssets
|
||||||
|
*/
|
||||||
|
public static Assets getAssets(boolean other) {
|
||||||
|
if (other)
|
||||||
|
return ((Forge)Gdx.app.getApplicationListener()).otherAssets;
|
||||||
|
else
|
||||||
|
return ((Forge)Gdx.app.getApplicationListener()).cardAssets;
|
||||||
|
}
|
||||||
public static boolean switchScene(Scene newScene) {
|
public static boolean switchScene(Scene newScene) {
|
||||||
if (currentScene != null) {
|
if (currentScene != null) {
|
||||||
if (!currentScene.leave())
|
if (!currentScene.leave())
|
||||||
|
|||||||
@@ -1132,6 +1132,7 @@ public class Graphics {
|
|||||||
P.setColor(1f,1f,1f,1f);
|
P.setColor(1f,1f,1f,1f);
|
||||||
P.drawPixel(0, 0);
|
P.drawPixel(0, 0);
|
||||||
dummyTexture = new Texture(P);
|
dummyTexture = new Texture(P);
|
||||||
|
P.dispose();
|
||||||
}
|
}
|
||||||
return dummyTexture;
|
return dummyTexture;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import com.badlogic.gdx.files.FileHandle;
|
|||||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||||
import com.badlogic.gdx.utils.Json;
|
import com.badlogic.gdx.utils.Json;
|
||||||
import com.badlogic.gdx.utils.JsonWriter;
|
import com.badlogic.gdx.utils.JsonWriter;
|
||||||
|
import forge.Forge;
|
||||||
import forge.adventure.data.ConfigData;
|
import forge.adventure.data.ConfigData;
|
||||||
import forge.adventure.data.SettingData;
|
import forge.adventure.data.SettingData;
|
||||||
import forge.assets.Assets;
|
|
||||||
import forge.deck.Deck;
|
import forge.deck.Deck;
|
||||||
import forge.gui.GuiBase;
|
import forge.gui.GuiBase;
|
||||||
import forge.localinstance.properties.ForgeConstants;
|
import forge.localinstance.properties.ForgeConstants;
|
||||||
@@ -26,7 +26,6 @@ public class Config {
|
|||||||
private static Config currentConfig;
|
private static Config currentConfig;
|
||||||
private final String prefix;
|
private final String prefix;
|
||||||
private final HashMap<String, FileHandle> Cache = new HashMap<String, FileHandle>();
|
private final HashMap<String, FileHandle> Cache = new HashMap<String, FileHandle>();
|
||||||
private final Assets atlasAssets = new Assets();
|
|
||||||
private final ConfigData configData;
|
private final ConfigData configData;
|
||||||
private final String[] adventures;
|
private final String[] adventures;
|
||||||
private SettingData settingsData;
|
private SettingData settingsData;
|
||||||
@@ -121,11 +120,11 @@ public class Config {
|
|||||||
|
|
||||||
public TextureAtlas getAtlas(String spriteAtlas) {
|
public TextureAtlas getAtlas(String spriteAtlas) {
|
||||||
String fileName = getFile(spriteAtlas).path();
|
String fileName = getFile(spriteAtlas).path();
|
||||||
if (!atlasAssets.manager().contains(fileName, TextureAtlas.class)) {
|
if (!Forge.getAssets(true).manager.contains(fileName, TextureAtlas.class)) {
|
||||||
atlasAssets.manager().load(fileName, TextureAtlas.class);
|
Forge.getAssets(true).manager.load(fileName, TextureAtlas.class);
|
||||||
atlasAssets.manager().finishLoadingAsset(fileName);
|
Forge.getAssets(true).manager.finishLoadingAsset(fileName);
|
||||||
}
|
}
|
||||||
return atlasAssets.manager().get(fileName);
|
return Forge.getAssets(true).manager.get(fileName);
|
||||||
}
|
}
|
||||||
public SettingData getSettingData()
|
public SettingData getSettingData()
|
||||||
{
|
{
|
||||||
@@ -143,7 +142,4 @@ public class Config {
|
|||||||
handle.writeString(json.prettyPrint(json.toJson(settingsData, SettingData.class)),false);
|
handle.writeString(json.prettyPrint(json.toJson(settingsData, SettingData.class)),false);
|
||||||
|
|
||||||
}
|
}
|
||||||
public void disposeTextureAtlasManager() {
|
|
||||||
atlasAssets.dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ import com.badlogic.gdx.utils.Disposable;
|
|||||||
|
|
||||||
public class Assets implements Disposable {
|
public class Assets implements Disposable {
|
||||||
public AssetManager manager = new AssetManager(new AbsoluteFileHandleResolver());
|
public AssetManager manager = new AssetManager(new AbsoluteFileHandleResolver());
|
||||||
public AssetManager manager() {
|
|
||||||
return manager;
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
manager.dispose();
|
manager.dispose();
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package forge.assets;
|
package forge.assets;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
|
import com.badlogic.gdx.assets.AssetManager;
|
||||||
|
import com.badlogic.gdx.assets.loaders.TextureLoader;
|
||||||
import com.badlogic.gdx.files.FileHandle;
|
import com.badlogic.gdx.files.FileHandle;
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.graphics.Pixmap;
|
import com.badlogic.gdx.graphics.Pixmap;
|
||||||
@@ -19,6 +21,7 @@ import forge.localinstance.skin.FSkinProp;
|
|||||||
import forge.model.FModel;
|
import forge.model.FModel;
|
||||||
import forge.screens.LoadingOverlay;
|
import forge.screens.LoadingOverlay;
|
||||||
import forge.screens.SplashScreen;
|
import forge.screens.SplashScreen;
|
||||||
|
import forge.screens.TransitionScreen;
|
||||||
import forge.toolbox.FProgressBar;
|
import forge.toolbox.FProgressBar;
|
||||||
import forge.util.WordUtil;
|
import forge.util.WordUtil;
|
||||||
|
|
||||||
@@ -50,38 +53,27 @@ public class FSkin {
|
|||||||
prefs.setPref(FPref.UI_SKIN, skinName);
|
prefs.setPref(FPref.UI_SKIN, skinName);
|
||||||
prefs.save();
|
prefs.save();
|
||||||
|
|
||||||
//load skin
|
Forge.setTransitionScreen(new TransitionScreen(new Runnable() {
|
||||||
loaded = false; //reset this temporarily until end of loadFull()
|
|
||||||
|
|
||||||
final LoadingOverlay loader = new LoadingOverlay("Loading new theme...");
|
|
||||||
loader.show(); //show loading overlay then delay running remaining logic so UI can respond
|
|
||||||
FThreads.invokeInBackgroundThread(new Runnable() {
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
FThreads.invokeInEdtLater(new Runnable() {
|
FThreads.invokeInBackgroundThread(() -> FThreads.invokeInEdtLater(() -> {
|
||||||
@Override
|
final LoadingOverlay loader = new LoadingOverlay(Forge.getLocalizer().getMessageorUseDefault("lblRestartInFewSeconds", "Forge will restart after a few seconds..."), true);
|
||||||
public void run() {
|
loader.show();
|
||||||
loadLight(skinName, null);
|
FThreads.invokeInBackgroundThread(() -> {
|
||||||
loadFull(null);
|
FSkinFont.deleteCachedFiles(); //delete cached font files so font can be update for new skin
|
||||||
loader.setCaption("Loading fonts...");
|
FThreads.delayInEDT(2000, new Runnable() {
|
||||||
FThreads.invokeInBackgroundThread(new Runnable() {
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
FSkinFont.deleteCachedFiles(); //delete cached font files so font can be update for new skin
|
Forge.clearTransitionScreen();
|
||||||
FSkinFont.updateAll();
|
FThreads.invokeInEdtLater(() -> {
|
||||||
//CardImageRenderer.forceStaticFieldUpdate();
|
Forge.restart(true);
|
||||||
FThreads.invokeInEdtLater(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
loader.hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
});
|
}, null, false, true));
|
||||||
}
|
}
|
||||||
public static void loadLight(String skinName, final SplashScreen splashScreen,FileHandle prefDir) {
|
public static void loadLight(String skinName, final SplashScreen splashScreen,FileHandle prefDir) {
|
||||||
preferredDir = prefDir;
|
preferredDir = prefDir;
|
||||||
@@ -96,6 +88,7 @@ public class FSkin {
|
|||||||
* the skin name
|
* the skin name
|
||||||
*/
|
*/
|
||||||
public static void loadLight(String skinName, final SplashScreen splashScreen) {
|
public static void loadLight(String skinName, final SplashScreen splashScreen) {
|
||||||
|
AssetManager manager = Forge.getAssets(true).manager;
|
||||||
preferredName = skinName.toLowerCase().replace(' ', '_');
|
preferredName = skinName.toLowerCase().replace(' ', '_');
|
||||||
|
|
||||||
//reset hd buttons/icons
|
//reset hd buttons/icons
|
||||||
@@ -137,25 +130,25 @@ public class FSkin {
|
|||||||
//load theme logo while changing skins
|
//load theme logo while changing skins
|
||||||
final FileHandle theme_logo = getSkinFile("hd_logo.png");
|
final FileHandle theme_logo = getSkinFile("hd_logo.png");
|
||||||
if (theme_logo.exists()) {
|
if (theme_logo.exists()) {
|
||||||
Texture txOverlay = new Texture(theme_logo, true);
|
manager.load(theme_logo.path(), Texture.class, new TextureLoader.TextureParameter(){{genMipMaps = true; minFilter = Texture.TextureFilter.MipMapLinearLinear; magFilter = Texture.TextureFilter.Linear;}});
|
||||||
txOverlay.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(theme_logo.path());
|
||||||
hdLogo = txOverlay;
|
hdLogo = manager.get(theme_logo.path());
|
||||||
} else {
|
} else {
|
||||||
hdLogo = null;
|
hdLogo = null;
|
||||||
}
|
}
|
||||||
final FileHandle duals_overlay = getDefaultSkinFile("overlay_alpha.png");
|
final FileHandle duals_overlay = getDefaultSkinFile("overlay_alpha.png");
|
||||||
if (duals_overlay.exists()) {
|
if (duals_overlay.exists()) {
|
||||||
Texture txAlphaLines = new Texture(duals_overlay, true);
|
manager.load(duals_overlay.path(), Texture.class, new TextureLoader.TextureParameter(){{genMipMaps = true; minFilter = Texture.TextureFilter.MipMapLinearLinear; magFilter = Texture.TextureFilter.Linear;}});
|
||||||
txAlphaLines.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(duals_overlay.path());
|
||||||
overlay_alpha = txAlphaLines;
|
overlay_alpha = manager.get(duals_overlay.path());
|
||||||
} else {
|
} else {
|
||||||
overlay_alpha = null;
|
overlay_alpha = null;
|
||||||
}
|
}
|
||||||
final FileHandle splatter_overlay = getDefaultSkinFile("splatter.png");
|
final FileHandle splatter_overlay = getDefaultSkinFile("splatter.png");
|
||||||
if (splatter_overlay.exists()) {
|
if (splatter_overlay.exists()) {
|
||||||
Texture txSplatter = new Texture(splatter_overlay, true);
|
manager.load(splatter_overlay.path(), Texture.class, new TextureLoader.TextureParameter(){{genMipMaps = true; minFilter = Texture.TextureFilter.MipMapLinearLinear; magFilter = Texture.TextureFilter.Linear;}});
|
||||||
txSplatter.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(splatter_overlay.path());
|
||||||
splatter = txSplatter;
|
splatter = manager.get(splatter_overlay.path());
|
||||||
} else {
|
} else {
|
||||||
splatter = null;
|
splatter = null;
|
||||||
}
|
}
|
||||||
@@ -172,16 +165,17 @@ public class FSkin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Texture txSplash = new Texture(f);
|
manager.load(f.path(), Texture.class);
|
||||||
final int w = txSplash.getWidth();
|
manager.finishLoadingAsset(f.path());
|
||||||
final int h = txSplash.getHeight();
|
final int w = manager.get(f.path(), Texture.class).getWidth();
|
||||||
|
final int h = manager.get(f.path(), Texture.class).getHeight();
|
||||||
|
|
||||||
if (f2.exists()) {
|
if (f2.exists()) {
|
||||||
Texture txSplashHD = new Texture(f2, true);
|
manager.load(f2.path(), Texture.class, new TextureLoader.TextureParameter(){{genMipMaps = true; minFilter = Texture.TextureFilter.MipMapLinearLinear; magFilter = Texture.TextureFilter.Linear;}});
|
||||||
txSplashHD.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(f2.path());
|
||||||
splashScreen.setBackground(new TextureRegion(txSplashHD));
|
splashScreen.setBackground(new TextureRegion(manager.get(f2.path(), Texture.class)));
|
||||||
} else {
|
} else {
|
||||||
splashScreen.setBackground(new TextureRegion(txSplash, 0, 0, w, h - 100));
|
splashScreen.setBackground(new TextureRegion(manager.get(f.path(), Texture.class), 0, 0, w, h - 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap pxSplash = new Pixmap(f);
|
Pixmap pxSplash = new Pixmap(f);
|
||||||
@@ -226,9 +220,14 @@ public class FSkin {
|
|||||||
avatars.clear();
|
avatars.clear();
|
||||||
sleeves.clear();
|
sleeves.clear();
|
||||||
|
|
||||||
boolean textureFilter = Forge.isTextureFilteringEnabled();
|
TextureLoader.TextureParameter parameter = new TextureLoader.TextureParameter();
|
||||||
|
if (Forge.isTextureFilteringEnabled()) {
|
||||||
|
parameter.genMipMaps = true;
|
||||||
|
parameter.minFilter = Texture.TextureFilter.MipMapLinearLinear;
|
||||||
|
parameter.magFilter = Texture.TextureFilter.Linear;
|
||||||
|
}
|
||||||
|
|
||||||
final Map<String, Texture> textures = new HashMap<>();
|
AssetManager manager = Forge.getAssets(true).manager;
|
||||||
|
|
||||||
// Grab and test various sprite files.
|
// Grab and test various sprite files.
|
||||||
final FileHandle f1 = getDefaultSkinFile(SourceFile.ICONS.getFilename());
|
final FileHandle f1 = getDefaultSkinFile(SourceFile.ICONS.getFilename());
|
||||||
@@ -255,24 +254,24 @@ public class FSkin {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
textures.put(f1.path(), new Texture(f1));
|
manager.load(f1.path(), Texture.class);
|
||||||
|
manager.finishLoadingAsset(f1.path());
|
||||||
Pixmap preferredIcons = new Pixmap(f1);
|
Pixmap preferredIcons = new Pixmap(f1);
|
||||||
if (f2.exists()) {
|
if (f2.exists()) {
|
||||||
textures.put(f2.path(), new Texture(f2));
|
manager.load(f2.path(), Texture.class);
|
||||||
|
manager.finishLoadingAsset(f2.path());
|
||||||
preferredIcons = new Pixmap(f2);
|
preferredIcons = new Pixmap(f2);
|
||||||
}
|
}
|
||||||
|
|
||||||
textures.put(f3.path(), new Texture(f3));
|
manager.load(f3.path(), Texture.class);
|
||||||
|
manager.finishLoadingAsset(f3.path());
|
||||||
if (f6.exists()) {
|
if (f6.exists()) {
|
||||||
textures.put(f6.path(), new Texture(f6));
|
manager.load(f6.path(), Texture.class);
|
||||||
}
|
manager.finishLoadingAsset(f6.path());
|
||||||
else {
|
|
||||||
textures.put(f6.path(), textures.get(f3.path()));
|
|
||||||
}
|
}
|
||||||
if (f7.exists()){
|
if (f7.exists()){
|
||||||
Texture t = new Texture(f7, true);
|
manager.load(f7.path(), Texture.class, new TextureLoader.TextureParameter(){{genMipMaps = true;}});
|
||||||
//t.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(f7.path());
|
||||||
textures.put(f7.path(), t);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//hdbuttons
|
//hdbuttons
|
||||||
@@ -280,9 +279,8 @@ public class FSkin {
|
|||||||
if (GuiBase.isAndroid() && Forge.totalDeviceRAM <5000) {
|
if (GuiBase.isAndroid() && Forge.totalDeviceRAM <5000) {
|
||||||
Forge.hdbuttons = false;
|
Forge.hdbuttons = false;
|
||||||
} else {
|
} else {
|
||||||
Texture t = new Texture(f11, true);
|
manager.load(f11.path(), Texture.class, new TextureLoader.TextureParameter(){{genMipMaps = true; minFilter = Texture.TextureFilter.MipMapLinearLinear; magFilter = Texture.TextureFilter.Linear;}});
|
||||||
t.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(f11.path());
|
||||||
textures.put(f11.path(), t);
|
|
||||||
Forge.hdbuttons = true;
|
Forge.hdbuttons = true;
|
||||||
}
|
}
|
||||||
} else { Forge.hdbuttons = false; } //how to refresh buttons when a theme don't have hd buttons?
|
} else { Forge.hdbuttons = false; } //how to refresh buttons when a theme don't have hd buttons?
|
||||||
@@ -290,9 +288,8 @@ public class FSkin {
|
|||||||
if (GuiBase.isAndroid() && Forge.totalDeviceRAM <5000) {
|
if (GuiBase.isAndroid() && Forge.totalDeviceRAM <5000) {
|
||||||
Forge.hdstart = false;
|
Forge.hdstart = false;
|
||||||
} else {
|
} else {
|
||||||
Texture t = new Texture(f12, true);
|
manager.load(f12.path(), Texture.class, new TextureLoader.TextureParameter(){{genMipMaps = true; minFilter = Texture.TextureFilter.MipMapLinearLinear; magFilter = Texture.TextureFilter.Linear;}});
|
||||||
t.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(f12.path());
|
||||||
textures.put(f12.path(), t);
|
|
||||||
Forge.hdstart = true;
|
Forge.hdstart = true;
|
||||||
}
|
}
|
||||||
} else { Forge.hdstart = false; }
|
} else { Forge.hdstart = false; }
|
||||||
@@ -305,13 +302,13 @@ public class FSkin {
|
|||||||
for (FSkinImage image : FSkinImage.values()) {
|
for (FSkinImage image : FSkinImage.values()) {
|
||||||
if (GuiBase.isAndroid()) {
|
if (GuiBase.isAndroid()) {
|
||||||
if (Forge.totalDeviceRAM>5000)
|
if (Forge.totalDeviceRAM>5000)
|
||||||
image.load(textures, preferredIcons);
|
image.load(manager, preferredIcons);
|
||||||
else if (image.toString().equals("HDMULTI"))
|
else if (image.toString().equals("HDMULTI"))
|
||||||
image.load(textures, preferredIcons);
|
image.load(manager, preferredIcons);
|
||||||
else if (!image.toString().startsWith("HD"))
|
else if (!image.toString().startsWith("HD"))
|
||||||
image.load(textures, preferredIcons);
|
image.load(manager, preferredIcons);
|
||||||
} else {
|
} else {
|
||||||
image.load(textures, preferredIcons);
|
image.load(manager, preferredIcons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (FSkinTexture texture : FSkinTexture.values()) {
|
for (FSkinTexture texture : FSkinTexture.values()) {
|
||||||
@@ -324,23 +321,21 @@ public class FSkin {
|
|||||||
int counter = 0;
|
int counter = 0;
|
||||||
int scount = 0;
|
int scount = 0;
|
||||||
Color pxTest;
|
Color pxTest;
|
||||||
Pixmap pxDefaultAvatars, pxPreferredAvatars, pxDefaultSleeves, pxCracks;
|
Pixmap pxDefaultAvatars, pxPreferredAvatars, pxDefaultSleeves;
|
||||||
Texture txDefaultAvatars, txPreferredAvatars, txDefaultSleeves, txCracks;
|
|
||||||
|
|
||||||
pxDefaultAvatars = new Pixmap(f4);
|
pxDefaultAvatars = new Pixmap(f4);
|
||||||
pxDefaultSleeves = new Pixmap(f8);
|
pxDefaultSleeves = new Pixmap(f8);
|
||||||
txDefaultAvatars = new Texture(f4, textureFilter);
|
//default avatar
|
||||||
if (textureFilter)
|
manager.load(f4.path(), Texture.class, parameter);
|
||||||
txDefaultAvatars.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(f4.path());
|
||||||
txDefaultSleeves = new Texture(f8, textureFilter);
|
//sleeves first set
|
||||||
if (textureFilter)
|
manager.load(f8.path(), Texture.class, parameter);
|
||||||
txDefaultSleeves.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
manager.finishLoadingAsset(f8.path());
|
||||||
|
//preferred avatar
|
||||||
if (f5.exists()) {
|
if (f5.exists()) {
|
||||||
pxPreferredAvatars = new Pixmap(f5);
|
pxPreferredAvatars = new Pixmap(f5);
|
||||||
txPreferredAvatars = new Texture(f5, textureFilter);
|
manager.load(f5.path(), Texture.class, parameter);
|
||||||
if (textureFilter)
|
manager.finishLoadingAsset(f5.path());
|
||||||
txPreferredAvatars.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
|
||||||
|
|
||||||
final int pw = pxPreferredAvatars.getWidth();
|
final int pw = pxPreferredAvatars.getWidth();
|
||||||
final int ph = pxPreferredAvatars.getHeight();
|
final int ph = pxPreferredAvatars.getHeight();
|
||||||
@@ -350,7 +345,7 @@ public class FSkin {
|
|||||||
if (i == 0 && j == 0) { continue; }
|
if (i == 0 && j == 0) { continue; }
|
||||||
pxTest = new Color(pxPreferredAvatars.getPixel(i + 50, j + 50));
|
pxTest = new Color(pxPreferredAvatars.getPixel(i + 50, j + 50));
|
||||||
if (pxTest.a == 0) { continue; }
|
if (pxTest.a == 0) { continue; }
|
||||||
FSkin.avatars.put(counter++, new TextureRegion(txPreferredAvatars, i, j, 100, 100));
|
FSkin.avatars.put(counter++, new TextureRegion(manager.get(f5.path(), Texture.class), i, j, 100, 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pxPreferredAvatars.dispose();
|
pxPreferredAvatars.dispose();
|
||||||
@@ -365,24 +360,11 @@ public class FSkin {
|
|||||||
if (i == 0 && j == 0) { continue; }
|
if (i == 0 && j == 0) { continue; }
|
||||||
pxTest = new Color(pxDefaultAvatars.getPixel(i + 50, j + 50));
|
pxTest = new Color(pxDefaultAvatars.getPixel(i + 50, j + 50));
|
||||||
if (pxTest.a == 0) { continue; }
|
if (pxTest.a == 0) { continue; }
|
||||||
FSkin.avatars.put(counter++, new TextureRegion(txDefaultAvatars, i, j, 100, 100));
|
FSkin.avatars.put(counter++, new TextureRegion(manager.get(f4.path(), Texture.class), i, j, 100, 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final int aw = pxDefaultAvatars.getWidth();
|
|
||||||
final int ah = pxDefaultAvatars.getHeight();
|
|
||||||
|
|
||||||
for (int j = 0; j < ah; j += 100) {
|
|
||||||
for (int i = 0; i < aw; i += 100) {
|
|
||||||
if (i == 0 && j == 0) { continue; }
|
|
||||||
pxTest = new Color(pxDefaultAvatars.getPixel(i + 50, j + 50));
|
|
||||||
if (pxTest.a == 0) { continue; }
|
|
||||||
FSkin.avatars.put(counter++, new TextureRegion(txDefaultAvatars, i, j, 100, 100));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
final int sw = pxDefaultSleeves.getWidth();
|
final int sw = pxDefaultSleeves.getWidth();
|
||||||
final int sh = pxDefaultSleeves.getHeight();
|
final int sh = pxDefaultSleeves.getHeight();
|
||||||
|
|
||||||
@@ -390,15 +372,14 @@ public class FSkin {
|
|||||||
for (int i = 0; i < sw; i += 360) {
|
for (int i = 0; i < sw; i += 360) {
|
||||||
pxTest = new Color(pxDefaultSleeves.getPixel(i + 180, j + 250));
|
pxTest = new Color(pxDefaultSleeves.getPixel(i + 180, j + 250));
|
||||||
if (pxTest.a == 0) { continue; }
|
if (pxTest.a == 0) { continue; }
|
||||||
FSkin.sleeves.put(scount++, new TextureRegion(txDefaultSleeves, i, j, 360, 500));
|
FSkin.sleeves.put(scount++, new TextureRegion(manager.get(f8.path(), Texture.class), i, j, 360, 500));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//re init second set of sleeves
|
//re init second set of sleeves
|
||||||
pxDefaultSleeves = new Pixmap(f9);
|
pxDefaultSleeves = new Pixmap(f9);
|
||||||
txDefaultSleeves = new Texture(f9, textureFilter);
|
manager.load(f9.path(), Texture.class, parameter);
|
||||||
if (textureFilter)
|
manager.finishLoadingAsset(f9.path());
|
||||||
txDefaultSleeves.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
|
||||||
|
|
||||||
final int sw2 = pxDefaultSleeves.getWidth();
|
final int sw2 = pxDefaultSleeves.getWidth();
|
||||||
final int sh2 = pxDefaultSleeves.getHeight();
|
final int sh2 = pxDefaultSleeves.getHeight();
|
||||||
@@ -407,50 +388,47 @@ public class FSkin {
|
|||||||
for (int i = 0; i < sw2; i += 360) {
|
for (int i = 0; i < sw2; i += 360) {
|
||||||
pxTest = new Color(pxDefaultSleeves.getPixel(i + 180, j + 250));
|
pxTest = new Color(pxDefaultSleeves.getPixel(i + 180, j + 250));
|
||||||
if (pxTest.a == 0) { continue; }
|
if (pxTest.a == 0) { continue; }
|
||||||
FSkin.sleeves.put(scount++, new TextureRegion(txDefaultSleeves, i, j, 360, 500));
|
FSkin.sleeves.put(scount++, new TextureRegion(manager.get(f9.path(), Texture.class), i, j, 360, 500));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//cracks
|
//cracks
|
||||||
pxCracks = new Pixmap(f17);
|
manager.load(f17.path(), Texture.class, parameter);
|
||||||
txCracks = new Texture(f17, textureFilter);
|
manager.finishLoadingAsset(f17.path());
|
||||||
int crackCount = 0;
|
int crackCount = 0;
|
||||||
if (textureFilter)
|
|
||||||
txCracks.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
|
||||||
|
|
||||||
for (int j = 0; j < 4; j++) {
|
for (int j = 0; j < 4; j++) {
|
||||||
int x = j * 200;
|
int x = j * 200;
|
||||||
for(int i = 0; i < 4; i++) {
|
for(int i = 0; i < 4; i++) {
|
||||||
int y = i * 279;
|
int y = i * 279;
|
||||||
FSkin.cracks.put(crackCount++, new TextureRegion(txCracks, x, y, 200, 279));
|
FSkin.cracks.put(crackCount++, new TextureRegion(manager.get(f17.path(), Texture.class), x, y, 200, 279));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//borders
|
//borders
|
||||||
Texture bordersBW = new Texture(f10);
|
manager.load(f10.path(), Texture.class);
|
||||||
FSkin.borders.put(0, new TextureRegion(bordersBW, 2, 2, 672, 936));
|
manager.finishLoadingAsset(f10.path());
|
||||||
FSkin.borders.put(1, new TextureRegion(bordersBW, 676, 2, 672, 936));
|
FSkin.borders.put(0, new TextureRegion(manager.get(f10.path(), Texture.class), 2, 2, 672, 936));
|
||||||
|
FSkin.borders.put(1, new TextureRegion(manager.get(f10.path(), Texture.class), 676, 2, 672, 936));
|
||||||
//deckboxes
|
//deckboxes
|
||||||
Texture deckboxes = new Texture(f13, textureFilter);
|
manager.load(f13.path(), Texture.class, parameter);
|
||||||
if (textureFilter)
|
manager.finishLoadingAsset(f13.path());
|
||||||
deckboxes.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
|
||||||
//gold bg
|
//gold bg
|
||||||
FSkin.deckbox.put(0, new TextureRegion(deckboxes, 2, 2, 488, 680));
|
FSkin.deckbox.put(0, new TextureRegion(manager.get(f13.path(), Texture.class), 2, 2, 488, 680));
|
||||||
//deck box for card art
|
//deck box for card art
|
||||||
FSkin.deckbox.put(1, new TextureRegion(deckboxes, 492, 2, 488, 680));
|
FSkin.deckbox.put(1, new TextureRegion(manager.get(f13.path(), Texture.class), 492, 2, 488, 680));
|
||||||
//generic deck box
|
//generic deck box
|
||||||
FSkin.deckbox.put(2, new TextureRegion(deckboxes, 982, 2, 488, 680));
|
FSkin.deckbox.put(2, new TextureRegion(manager.get(f13.path(), Texture.class), 982, 2, 488, 680));
|
||||||
//cursor
|
//cursor
|
||||||
Texture cursors = new Texture(f19);
|
manager.load(f19.path(), Texture.class);
|
||||||
FSkin.cursor.put(0, new TextureRegion(cursors, 0, 0, 32, 32)); //default
|
manager.finishLoadingAsset(f19.path());
|
||||||
FSkin.cursor.put(1, new TextureRegion(cursors, 32, 0, 32, 32)); //magnify on
|
FSkin.cursor.put(0, new TextureRegion(manager.get(f19.path(), Texture.class), 0, 0, 32, 32)); //default
|
||||||
FSkin.cursor.put(2, new TextureRegion(cursors, 64, 0, 32, 32)); // magnify off
|
FSkin.cursor.put(1, new TextureRegion(manager.get(f19.path(), Texture.class), 32, 0, 32, 32)); //magnify on
|
||||||
|
FSkin.cursor.put(2, new TextureRegion(manager.get(f19.path(), Texture.class), 64, 0, 32, 32)); // magnify off
|
||||||
|
|
||||||
Forge.setCursor(cursor.get(0), "0");
|
Forge.setCursor(cursor.get(0), "0");
|
||||||
|
|
||||||
preferredIcons.dispose();
|
preferredIcons.dispose();
|
||||||
pxDefaultAvatars.dispose();
|
pxDefaultAvatars.dispose();
|
||||||
pxDefaultSleeves.dispose();
|
pxDefaultSleeves.dispose();
|
||||||
pxCracks.dispose();
|
|
||||||
}
|
}
|
||||||
catch (final Exception e) {
|
catch (final Exception e) {
|
||||||
System.err.println("FSkin$loadFull: Missing a sprite (default icons, "
|
System.err.println("FSkin$loadFull: Missing a sprite (default icons, "
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package forge.assets;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.files.FileHandle;
|
import com.badlogic.gdx.files.FileHandle;
|
||||||
@@ -38,7 +39,7 @@ public class FSkinFont {
|
|||||||
private static final int MAX_FONT_SIZE_MANY_GLYPHS = 36;
|
private static final int MAX_FONT_SIZE_MANY_GLYPHS = 36;
|
||||||
|
|
||||||
private static final String TTF_FILE = "font1.ttf";
|
private static final String TTF_FILE = "font1.ttf";
|
||||||
private static final ObjectMap<Integer, FSkinFont> fonts = new ObjectMap<>();
|
private static final HashMap<Integer, FSkinFont> fonts = new HashMap<>();
|
||||||
|
|
||||||
private static final String commonCharacterSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"
|
private static final String commonCharacterSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"
|
||||||
+ "nopqrstuvwxyz1234567890\"!?'.,;:()[]{}<>|/@\\^$-%+=#_&*\u2014"
|
+ "nopqrstuvwxyz1234567890\"!?'.,;:()[]{}<>|/@\\^$-%+=#_&*\u2014"
|
||||||
@@ -395,24 +396,34 @@ public class FSkinFont {
|
|||||||
fontName += Forge.locale;
|
fontName += Forge.locale;
|
||||||
}
|
}
|
||||||
FileHandle fontFile = Gdx.files.absolute(ForgeConstants.FONTS_DIR + fontName + ".fnt");
|
FileHandle fontFile = Gdx.files.absolute(ForgeConstants.FONTS_DIR + fontName + ".fnt");
|
||||||
|
final boolean[] found = {false};
|
||||||
if (fontFile != null && fontFile.exists()) {
|
if (fontFile != null && fontFile.exists()) {
|
||||||
final BitmapFontData data = new BitmapFontData(fontFile, false);
|
final BitmapFontData data = new BitmapFontData(fontFile, false);
|
||||||
|
String finalFontName = fontName;
|
||||||
FThreads.invokeInEdtNowOrLater(new Runnable() {
|
FThreads.invokeInEdtNowOrLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() { //font must be initialized on UI thread
|
public void run() { //font must be initialized on UI thread
|
||||||
font = new BitmapFont(data, (TextureRegion)null, true);
|
try {
|
||||||
|
font = new BitmapFont(data, (TextureRegion) null, true);
|
||||||
|
found[0] = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
found[0] = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
}
|
||||||
if (Forge.locale.equals("zh-CN") || Forge.locale.equals("ja-JP") && !Forge.forcedEnglishonCJKMissing) {
|
if (found[0])
|
||||||
String ttfName = Forge.CJK_Font;
|
return;
|
||||||
FileHandle ttfFile = Gdx.files.absolute(ForgeConstants.FONTS_DIR + ttfName + ".ttf");
|
//not found generate
|
||||||
if (ttfFile != null && ttfFile.exists()) {
|
if (Forge.locale.equals("zh-CN") || Forge.locale.equals("ja-JP") && !Forge.forcedEnglishonCJKMissing) {
|
||||||
generateFont(ttfFile, fontName, fontSize);
|
String ttfName = Forge.CJK_Font;
|
||||||
}
|
FileHandle ttfFile = Gdx.files.absolute(ForgeConstants.FONTS_DIR + ttfName + ".ttf");
|
||||||
} else {
|
if (ttfFile != null && ttfFile.exists()) {
|
||||||
generateFont(FSkin.getSkinFile(TTF_FILE), fontName, fontSize);
|
generateFont(ttfFile, fontName, fontSize);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
generateFont(FSkin.getSkinFile(TTF_FILE), fontName, fontSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package forge.assets;
|
package forge.assets;
|
||||||
|
|
||||||
import java.util.Map;
|
import com.badlogic.gdx.assets.AssetManager;
|
||||||
|
import com.badlogic.gdx.assets.loaders.TextureLoader.TextureParameter;
|
||||||
import com.badlogic.gdx.files.FileHandle;
|
import com.badlogic.gdx.files.FileHandle;
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.graphics.Pixmap;
|
import com.badlogic.gdx.graphics.Pixmap;
|
||||||
@@ -536,19 +536,22 @@ public enum FSkinImage implements FImage {
|
|||||||
FSkin.getImages().put(skinProp, this);
|
FSkin.getImages().put(skinProp, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void load(Map<String, Texture> textures, Pixmap preferredIcons) {
|
public void load(AssetManager manager, Pixmap preferredIcons) {
|
||||||
String filename = sourceFile.getFilename();
|
String filename = sourceFile.getFilename();
|
||||||
FileHandle preferredFile = FSkin.getSkinFile(filename);
|
FileHandle preferredFile = FSkin.getSkinFile(filename);
|
||||||
Texture texture = textures.get(preferredFile.path());
|
Texture texture = manager.get(preferredFile.path(), Texture.class, false);
|
||||||
if (texture == null) {
|
if (texture == null) {
|
||||||
if (preferredFile.exists()) {
|
if (preferredFile.exists()) {
|
||||||
try {
|
try {
|
||||||
if (Forge.isTextureFilteringEnabled()){
|
TextureParameter parameter = new TextureParameter();
|
||||||
texture = new Texture(preferredFile, true);
|
if (Forge.isTextureFilteringEnabled()) {
|
||||||
texture.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
parameter.genMipMaps = true;
|
||||||
} else {
|
parameter.minFilter = Texture.TextureFilter.MipMapLinearLinear;
|
||||||
texture = new Texture(preferredFile);
|
parameter.magFilter = Texture.TextureFilter.Linear;
|
||||||
}
|
}
|
||||||
|
manager.load(preferredFile.path(), Texture.class, parameter);
|
||||||
|
manager.finishLoadingAsset(preferredFile.path());
|
||||||
|
texture = manager.get(preferredFile.path(), Texture.class);
|
||||||
}
|
}
|
||||||
catch (final Exception e) {
|
catch (final Exception e) {
|
||||||
System.err.println("Failed to load skin file: " + preferredFile);
|
System.err.println("Failed to load skin file: " + preferredFile);
|
||||||
@@ -615,16 +618,19 @@ public enum FSkinImage implements FImage {
|
|||||||
|
|
||||||
//use default file if can't use preferred file
|
//use default file if can't use preferred file
|
||||||
FileHandle defaultFile = FSkin.getDefaultSkinFile(filename);
|
FileHandle defaultFile = FSkin.getDefaultSkinFile(filename);
|
||||||
texture = textures.get(defaultFile.path());
|
texture = manager.get(defaultFile.path(), Texture.class, false);
|
||||||
if (texture == null) {
|
if (texture == null) {
|
||||||
if (defaultFile.exists()) {
|
if (defaultFile.exists()) {
|
||||||
try {
|
try {
|
||||||
if (Forge.isTextureFilteringEnabled()){
|
TextureParameter parameter = new TextureParameter();
|
||||||
texture = new Texture(defaultFile, true);
|
if (Forge.isTextureFilteringEnabled()) {
|
||||||
texture.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
parameter.genMipMaps = true;
|
||||||
} else {
|
parameter.minFilter = Texture.TextureFilter.MipMapLinearLinear;
|
||||||
texture = new Texture(defaultFile);
|
parameter.magFilter = Texture.TextureFilter.Linear;
|
||||||
}
|
}
|
||||||
|
manager.load(defaultFile.path(), Texture.class, parameter);
|
||||||
|
manager.finishLoadingAsset(defaultFile.path());
|
||||||
|
texture = manager.get(defaultFile.path(), Texture.class);
|
||||||
}
|
}
|
||||||
catch (final Exception e) {
|
catch (final Exception e) {
|
||||||
System.err.println("Failed to load skin file: " + defaultFile);
|
System.err.println("Failed to load skin file: " + defaultFile);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.badlogic.gdx.files.FileHandle;
|
|||||||
import com.badlogic.gdx.graphics.Texture;
|
import com.badlogic.gdx.graphics.Texture;
|
||||||
import com.badlogic.gdx.graphics.Texture.TextureWrap;
|
import com.badlogic.gdx.graphics.Texture.TextureWrap;
|
||||||
|
|
||||||
|
import forge.Forge;
|
||||||
import forge.Graphics;
|
import forge.Graphics;
|
||||||
import forge.localinstance.properties.ForgeConstants;
|
import forge.localinstance.properties.ForgeConstants;
|
||||||
|
|
||||||
@@ -127,7 +128,9 @@ public enum FSkinTexture implements FImage {
|
|||||||
FileHandle preferredFile = isPlane ? FSkin.getCachePlanechaseFile(filename) : FSkin.getSkinFile(filename);
|
FileHandle preferredFile = isPlane ? FSkin.getCachePlanechaseFile(filename) : FSkin.getSkinFile(filename);
|
||||||
if (preferredFile.exists()) {
|
if (preferredFile.exists()) {
|
||||||
try {
|
try {
|
||||||
texture = new Texture(preferredFile);
|
Forge.getAssets(true).manager.load(preferredFile.path(), Texture.class);
|
||||||
|
Forge.getAssets(true).manager.finishLoadingAsset(preferredFile.path());
|
||||||
|
texture = Forge.getAssets(true).manager.get(preferredFile.path(), Texture.class);
|
||||||
}
|
}
|
||||||
catch (final Exception e) {
|
catch (final Exception e) {
|
||||||
System.err.println("Failed to load skin file: " + preferredFile);
|
System.err.println("Failed to load skin file: " + preferredFile);
|
||||||
@@ -145,7 +148,9 @@ public enum FSkinTexture implements FImage {
|
|||||||
|
|
||||||
if (defaultFile.exists()) {
|
if (defaultFile.exists()) {
|
||||||
try {
|
try {
|
||||||
texture = new Texture(defaultFile);
|
Forge.getAssets(true).manager.load(defaultFile.path(), Texture.class);
|
||||||
|
Forge.getAssets(true).manager.finishLoadingAsset(defaultFile.path());
|
||||||
|
texture = Forge.getAssets(true).manager.get(defaultFile.path(), Texture.class);
|
||||||
}
|
}
|
||||||
catch (final Exception e) {
|
catch (final Exception e) {
|
||||||
System.err.println("Failed to load skin file: " + defaultFile);
|
System.err.println("Failed to load skin file: " + defaultFile);
|
||||||
|
|||||||
@@ -115,10 +115,6 @@ public class ImageCache {
|
|||||||
CardRenderer.clearcardArtCache();
|
CardRenderer.clearcardArtCache();
|
||||||
((Forge)Gdx.app.getApplicationListener()).cardAssets.manager().clear();
|
((Forge)Gdx.app.getApplicationListener()).cardAssets.manager().clear();
|
||||||
}
|
}
|
||||||
public static void disposeTextureManager() {
|
|
||||||
((Forge)Gdx.app.getApplicationListener()).cardAssets.dispose();
|
|
||||||
((Forge)Gdx.app.getApplicationListener()).otherAssets.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Texture getImage(InventoryItem ii) {
|
public static Texture getImage(InventoryItem ii) {
|
||||||
String imageKey = ii.getImageKey(false);
|
String imageKey = ii.getImageKey(false);
|
||||||
@@ -271,17 +267,19 @@ public class ImageCache {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String fileName = file.getPath();
|
String fileName = file.getPath();
|
||||||
|
//load to assetmanager
|
||||||
|
Forge.getAssets(otherCache).manager.load(fileName, Texture.class, Forge.isTextureFilteringEnabled() ? filtered : defaultParameter);
|
||||||
|
Forge.getAssets(otherCache).manager.finishLoadingAsset(fileName);
|
||||||
|
//return loaded assets
|
||||||
if (otherCache) {
|
if (otherCache) {
|
||||||
((Forge)Gdx.app.getApplicationListener()).otherAssets.manager().load(fileName, Texture.class, Forge.isTextureFilteringEnabled() ? filtered : defaultParameter);
|
return Forge.getAssets(true).manager.get(fileName, Texture.class, false);
|
||||||
((Forge)Gdx.app.getApplicationListener()).otherAssets.manager().finishLoadingAsset(fileName);
|
|
||||||
return ((Forge)Gdx.app.getApplicationListener()).otherAssets.manager().get(fileName, Texture.class, false);
|
|
||||||
} else {
|
} else {
|
||||||
((Forge)Gdx.app.getApplicationListener()).cardAssets.manager().load(fileName, Texture.class, Forge.isTextureFilteringEnabled() ? filtered : defaultParameter);
|
Texture t = Forge.getAssets(false).manager.get(fileName, Texture.class, false);
|
||||||
((Forge)Gdx.app.getApplicationListener()).cardAssets.manager().finishLoadingAsset(fileName);
|
//if full bordermasking is enabled, update the border color
|
||||||
Texture t = ((Forge)Gdx.app.getApplicationListener()).cardAssets.manager().get(fileName, Texture.class, false);
|
|
||||||
if (Forge.enableUIMask.equals("Full")) {
|
if (Forge.enableUIMask.equals("Full")) {
|
||||||
boolean borderless = isBorderless(imageKey);
|
boolean borderless = isBorderless(imageKey);
|
||||||
updateBorders(t.toString(), borderless ? Pair.of(Color.valueOf("#171717").toString(), false): isCloserToWhite(getpixelColor(t)));
|
updateBorders(t.toString(), borderless ? Pair.of(Color.valueOf("#171717").toString(), false): isCloserToWhite(getpixelColor(t)));
|
||||||
|
//if borderless, generate new texture from the asset and store
|
||||||
if (borderless) {
|
if (borderless) {
|
||||||
generatedCards.put(imageKey, generateTexture(new FileHandle(file), t, Forge.isTextureFilteringEnabled()));
|
generatedCards.put(imageKey, generateTexture(new FileHandle(file), t, Forge.isTextureFilteringEnabled()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,11 +59,17 @@ public class LoadingOverlay extends FOverlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String caption;
|
private String caption;
|
||||||
|
private boolean textMode = false;
|
||||||
|
|
||||||
public LoadingOverlay(String caption0) {
|
public LoadingOverlay(String caption0) {
|
||||||
caption = caption0;
|
caption = caption0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LoadingOverlay(String caption0, boolean textOnly) {
|
||||||
|
caption = caption0;
|
||||||
|
textMode = textOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public void setCaption(String caption0) {
|
public void setCaption(String caption0) {
|
||||||
caption = caption0;
|
caption = caption0;
|
||||||
}
|
}
|
||||||
@@ -79,34 +85,38 @@ public class LoadingOverlay extends FOverlay {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawOverlay(Graphics g) {
|
public void drawOverlay(Graphics g) {
|
||||||
float x = INSETS;
|
if (!textMode) {
|
||||||
float panelWidth = getWidth() - 2 * INSETS;
|
float x = INSETS;
|
||||||
|
float panelWidth = getWidth() - 2 * INSETS;
|
||||||
|
|
||||||
if (Forge.isLandscapeMode()) {
|
if (Forge.isLandscapeMode()) {
|
||||||
panelWidth = getHeight() - 2 * INSETS;
|
panelWidth = getHeight() - 2 * INSETS;
|
||||||
x = (getWidth() - panelWidth) / 2;
|
x = (getWidth() - panelWidth) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
float padding = panelWidth * INSETS_FACTOR;
|
||||||
|
float logoSize = panelWidth * LOGO_SIZE_FACTOR;
|
||||||
|
float fontHeight = FONT.getCapHeight();
|
||||||
|
float panelHeight = logoSize + fontHeight + 4 * padding;
|
||||||
|
|
||||||
|
float y = (getHeight() - panelHeight) / 2;
|
||||||
|
float oldAlpha = g.getfloatAlphaComposite();
|
||||||
|
//dark translucent back..
|
||||||
|
g.setAlphaComposite(0.6f);
|
||||||
|
g.fillRect(Color.BLACK, 0, 0, getWidth(), getHeight());
|
||||||
|
g.setAlphaComposite(oldAlpha);
|
||||||
|
//overlay
|
||||||
|
g.fillRect(BACK_COLOR, x, y, panelWidth, panelHeight);
|
||||||
|
g.drawRect(Utils.scale(2), FORE_COLOR, x, y, panelWidth, panelHeight);
|
||||||
|
y += padding;
|
||||||
|
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;
|
||||||
|
g.drawText(caption, FONT, FORE_COLOR, x, y, panelWidth, getHeight(), false, Align.center, false);
|
||||||
|
} else {
|
||||||
|
g.drawText(caption, FONT, FORE_COLOR, 0, 0, getWidth(), getHeight(), true, Align.center, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
float padding = panelWidth * INSETS_FACTOR;
|
|
||||||
float logoSize = panelWidth * LOGO_SIZE_FACTOR;
|
|
||||||
float fontHeight = FONT.getCapHeight();
|
|
||||||
float panelHeight = logoSize + fontHeight + 4 * padding;
|
|
||||||
|
|
||||||
float y = (getHeight() - panelHeight) / 2;
|
|
||||||
float oldAlpha = g.getfloatAlphaComposite();
|
|
||||||
//dark translucent back..
|
|
||||||
g.setAlphaComposite(0.6f);
|
|
||||||
g.fillRect(Color.BLACK, 0, 0, getWidth(), getHeight());
|
|
||||||
g.setAlphaComposite(oldAlpha);
|
|
||||||
//overlay
|
|
||||||
g.fillRect(BACK_COLOR, x, y, panelWidth, panelHeight);
|
|
||||||
g.drawRect(Utils.scale(2), FORE_COLOR, x, y, panelWidth, panelHeight);
|
|
||||||
y += padding;
|
|
||||||
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;
|
|
||||||
g.drawText(caption, FONT, FORE_COLOR, x, y, panelWidth, getHeight(), false, Align.center, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2849,6 +2849,7 @@ lblNewVersionAvailable=Neue Version vorhanden
|
|||||||
lblNewVersionDownloading=Lade neue Version...
|
lblNewVersionDownloading=Lade neue Version...
|
||||||
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge wurde heruntergeladen. Du solltest die Datei entpacken und Forge neu starten.
|
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge wurde heruntergeladen. Du solltest die Datei entpacken und Forge neu starten.
|
||||||
lblExitNowConfirm=Jetzt verlassen?
|
lblExitNowConfirm=Jetzt verlassen?
|
||||||
|
lblRestartInFewSeconds=Forge wird nach ein paar Sekunden neu starten ...
|
||||||
#OnlineChatScreen.java
|
#OnlineChatScreen.java
|
||||||
lblEnterMessageToSend=Nachricht zum Senden eingeben
|
lblEnterMessageToSend=Nachricht zum Senden eingeben
|
||||||
#OnlineLobbyScreen.java
|
#OnlineLobbyScreen.java
|
||||||
|
|||||||
@@ -2852,6 +2852,7 @@ lblNewVersionAvailable=New Version Available
|
|||||||
lblNewVersionDownloading=Download the new version..
|
lblNewVersionDownloading=Download the new version..
|
||||||
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge has been downloaded. You should extract the package and restart Forge for the new version.
|
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge has been downloaded. You should extract the package and restart Forge for the new version.
|
||||||
lblExitNowConfirm=Exit now?
|
lblExitNowConfirm=Exit now?
|
||||||
|
lblRestartInFewSeconds=Forge will restart after a few seconds...
|
||||||
#OnlineChatScreen.java
|
#OnlineChatScreen.java
|
||||||
lblEnterMessageToSend=Enter message to send
|
lblEnterMessageToSend=Enter message to send
|
||||||
#OnlineLobbyScreen.java
|
#OnlineLobbyScreen.java
|
||||||
|
|||||||
@@ -2852,6 +2852,7 @@ lblNewVersionAvailable=Nueva versión disponible
|
|||||||
lblNewVersionDownloading=Descarga la nueva versión ...
|
lblNewVersionDownloading=Descarga la nueva versión ...
|
||||||
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge se ha descargado. Extrae el fichero y reinicia Forge para cargar la nueva versión.
|
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge se ha descargado. Extrae el fichero y reinicia Forge para cargar la nueva versión.
|
||||||
lblExitNowConfirm=¿Salir ahora?
|
lblExitNowConfirm=¿Salir ahora?
|
||||||
|
lblRestartInFewSeconds=Forge se reiniciará después de unos segundos ...
|
||||||
#OnlineChatScreen.java
|
#OnlineChatScreen.java
|
||||||
lblEnterMessageToSend=Introduce el mensaje a enviar
|
lblEnterMessageToSend=Introduce el mensaje a enviar
|
||||||
#OnlineLobbyScreen.java
|
#OnlineLobbyScreen.java
|
||||||
|
|||||||
@@ -2855,6 +2855,7 @@ lblNewVersionAvailable=Nuova versione disponibile
|
|||||||
lblNewVersionDownloading=Scaricamento nuova versione...
|
lblNewVersionDownloading=Scaricamento nuova versione...
|
||||||
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge è stato scaricato. Devi estrarre i dati dal file compresso e riavviare Forge.
|
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge è stato scaricato. Devi estrarre i dati dal file compresso e riavviare Forge.
|
||||||
lblExitNowConfirm=Vuoi uscire ora?
|
lblExitNowConfirm=Vuoi uscire ora?
|
||||||
|
lblRestartInFewSeconds=Forge si riavvierà dopo pochi secondi ...
|
||||||
#OnlineChatScreen.java
|
#OnlineChatScreen.java
|
||||||
lblEnterMessageToSend=Inserisci il messaggio da inviare
|
lblEnterMessageToSend=Inserisci il messaggio da inviare
|
||||||
#OnlineLobbyScreen.java
|
#OnlineLobbyScreen.java
|
||||||
|
|||||||
@@ -2851,6 +2851,7 @@ lblNewVersionAvailable=新しいバージョンを見つかりました
|
|||||||
lblNewVersionDownloading=新しいバージョンをダウンロード中...
|
lblNewVersionDownloading=新しいバージョンをダウンロード中...
|
||||||
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge のダウンロードが完了しました。パッケージを解凍して Forge を再起動してください。
|
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge のダウンロードが完了しました。パッケージを解凍して Forge を再起動してください。
|
||||||
lblExitNowConfirm=終了しますか?
|
lblExitNowConfirm=終了しますか?
|
||||||
|
lblRestartInFewSeconds=Forge は数秒後に再起動します...
|
||||||
#OnlineChatScreen.java
|
#OnlineChatScreen.java
|
||||||
lblEnterMessageToSend=送るメッセージを入力
|
lblEnterMessageToSend=送るメッセージを入力
|
||||||
#OnlineLobbyScreen.java
|
#OnlineLobbyScreen.java
|
||||||
|
|||||||
@@ -2941,6 +2941,7 @@ lblNewVersionAvailable=Nova Versão Disponível
|
|||||||
lblNewVersionDownloading=Baixar a nova versão..
|
lblNewVersionDownloading=Baixar a nova versão..
|
||||||
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=O Forge foi baixado. Você deve extrair o pacote e reiniciar o Forge para a nova versão.
|
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=O Forge foi baixado. Você deve extrair o pacote e reiniciar o Forge para a nova versão.
|
||||||
lblExitNowConfirm=Sair agora?
|
lblExitNowConfirm=Sair agora?
|
||||||
|
lblRestartInFewSeconds=Forge irá reiniciar depois de alguns segundos ...
|
||||||
#OnlineChatScreen.java
|
#OnlineChatScreen.java
|
||||||
lblEnterMessageToSend=Digite a mensagem a enviar
|
lblEnterMessageToSend=Digite a mensagem a enviar
|
||||||
#OnlineLobbyScreen.java
|
#OnlineLobbyScreen.java
|
||||||
|
|||||||
@@ -2834,6 +2834,7 @@ lblNewVersionAvailable=有新版本可用
|
|||||||
lblNewVersionDownloading=下载新版本中
|
lblNewVersionDownloading=下载新版本中
|
||||||
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge已经下载好。你应该解压压缩包并使用新版本的Forge重启游戏。
|
lblForgeHasBeenUpdateRestartForgeToUseNewVersion=Forge已经下载好。你应该解压压缩包并使用新版本的Forge重启游戏。
|
||||||
lblExitNowConfirm=现在退出吗?
|
lblExitNowConfirm=现在退出吗?
|
||||||
|
lblRestartInFewSeconds=Forge 将在几秒钟后重新启动...
|
||||||
#OnlineChatScreen.java
|
#OnlineChatScreen.java
|
||||||
lblEnterMessageToSend=输入要发送的信息
|
lblEnterMessageToSend=输入要发送的信息
|
||||||
#OnlineLobbyScreen.java
|
#OnlineLobbyScreen.java
|
||||||
|
|||||||
Reference in New Issue
Block a user