mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Enforced singleton pattern in FSkin.
Converted FSkin to static factory. Updated all uses of FSkin as appropriate. Removed all extra references/storages to FSkin.
This commit is contained in:
@@ -40,6 +40,7 @@ import forge.properties.ForgePreferences.FPref;
|
||||
import forge.quest.data.QuestPreferences;
|
||||
import forge.util.FileUtil;
|
||||
import forge.util.HttpUtil;
|
||||
import forge.view.toolbox.FSkin;
|
||||
|
||||
/**
|
||||
* The default Model implementation for Forge.
|
||||
@@ -100,13 +101,19 @@ public class FModel {
|
||||
// Unfortunately, they're tied up in legacy code in the Display interface,
|
||||
// currently in GuiTopLevel. When that code is updated, this TODO should be resolved.
|
||||
// Doublestrike 24-01-12
|
||||
// ==
|
||||
// It's looking like all the settings at the same time, here only.
|
||||
// Doublestrike 06-02-12
|
||||
Constant.Runtime.DEV_MODE[0] = preferences.getPrefBoolean(FPref.DEV_MODE_ENABLED);
|
||||
Constant.Runtime.SKIN_NAME = preferences.getPref(FPref.UI_SKIN);
|
||||
|
||||
// Load splash image and preloader swatches for skin
|
||||
FSkin.loadLight(Constant.Runtime.SKIN_NAME);
|
||||
|
||||
// Instantiate AI
|
||||
AllZone.setInputControl(new InputControl(FModel.this));
|
||||
AllZone.getInputControl().setComputer(new ComputerAIInput(new ComputerAIGeneral()));
|
||||
|
||||
|
||||
// Set gameplay preferences and constants
|
||||
final HttpUtil pinger = new HttpUtil();
|
||||
final String url = ForgeProps.getProperty(NewConstants.CARDFORGE_URL) + "/draftAI/ping.php";
|
||||
|
||||
Reference in New Issue
Block a user