mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Add Option for Preload
This commit is contained in:
@@ -129,7 +129,8 @@ public class Forge implements ApplicationListener {
|
|||||||
splashScreen.getProgressBar().setDescription(localizer.getMessage("lblFinishingStartup"));
|
splashScreen.getProgressBar().setDescription(localizer.getMessage("lblFinishingStartup"));
|
||||||
|
|
||||||
//add reminder to preload
|
//add reminder to preload
|
||||||
splashScreen.getProgressBar().setDescription("Preload Extended Art...");
|
if (prefs.getPrefBoolean(FPref.UI_ENABLE_PRELOAD_EXTENDED_ART))
|
||||||
|
splashScreen.getProgressBar().setDescription("Preload Extended Art...");
|
||||||
Gdx.app.postRunnable(new Runnable() {
|
Gdx.app.postRunnable(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -144,7 +145,9 @@ public class Forge implements ApplicationListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void preloadExtendedArt() {
|
private void preloadExtendedArt() {
|
||||||
List<String> keys = new ArrayList<>();
|
if (!FModel.getPreferences().getPrefBoolean(FPref.UI_ENABLE_PRELOAD_EXTENDED_ART))
|
||||||
|
return;
|
||||||
|
List<String> keys = new ArrayList<>();
|
||||||
File[] directories = new File(ForgeConstants.CACHE_CARD_PICS_DIR).listFiles(new FileFilter() {
|
File[] directories = new File(ForgeConstants.CACHE_CARD_PICS_DIR).listFiles(new FileFilter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(File file) {
|
public boolean accept(File file) {
|
||||||
|
|||||||
@@ -305,6 +305,10 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
|||||||
"Enable Round Border Mask",
|
"Enable Round Border Mask",
|
||||||
"When enabled, the card corners are rounded (Preferably Card with Full Borders)."),
|
"When enabled, the card corners are rounded (Preferably Card with Full Borders)."),
|
||||||
4);
|
4);
|
||||||
|
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_PRELOAD_EXTENDED_ART,
|
||||||
|
"Preload Extended Art Cards",
|
||||||
|
"When enabled, Preloads Extended Art Cards to Cache on Startup."),
|
||||||
|
4);
|
||||||
lstSettings.addItem(new BooleanSetting(FPref.UI_SHOW_FPS,
|
lstSettings.addItem(new BooleanSetting(FPref.UI_SHOW_FPS,
|
||||||
"Show FPS Display",
|
"Show FPS Display",
|
||||||
"When enabled, show the FPS Display (Experimental)."){
|
"When enabled, show the FPS Display (Experimental)."){
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
|||||||
UI_ROTATE_SPLIT_CARDS("true"),
|
UI_ROTATE_SPLIT_CARDS("true"),
|
||||||
UI_DYNAMIC_PLANECHASE_BG("false"),
|
UI_DYNAMIC_PLANECHASE_BG("false"),
|
||||||
UI_DISABLE_IMAGES_EFFECT_CARDS("false"),
|
UI_DISABLE_IMAGES_EFFECT_CARDS("false"),
|
||||||
|
UI_ENABLE_PRELOAD_EXTENDED_ART("false"),
|
||||||
UI_ENABLE_BORDER_MASKING("false"),
|
UI_ENABLE_BORDER_MASKING("false"),
|
||||||
UI_SHOW_FPS("false"),
|
UI_SHOW_FPS("false"),
|
||||||
UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED ("Never"),
|
UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED ("Never"),
|
||||||
|
|||||||
Reference in New Issue
Block a user