Commit 6a4704a4 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

#884 updated tablexia to support hd packs

parent 436e5412
......@@ -106,6 +106,9 @@ public class Tablexia extends TablexiaApplication {
private static final boolean LOADER_ERROR_DIALOG_HIDE_ANIMATION = false;
private static final float LOCALE_CHANGE_DELAY = 1f;
private static final boolean DEFAULT_HD_ASSETS = false;
private static final String LOG_FILE_NAME = "session.log";
private static IConnectionManager connectionManager;
......@@ -147,8 +150,13 @@ public class Tablexia extends TablexiaApplication {
}
}
public Tablexia(String buildType, Locale systemLocale, SQLConnectionType sqlConnectionType, IConnectionManager connManager, CameraOpener cameraOpener, IFileSystemManager fileSystemManager,
public Tablexia(String buildType, Locale systemLocale, SQLConnectionType sqlConnectionType, IConnectionManager connManager, CameraOpener cameraOpener, IFileSystemManager fileSystemManager,
QRCodeScanner qrCodeScanner, String sentryDSN, boolean hasSoftBackButton, boolean supportAlternativeControls, boolean reset, String hwSerial) {
this(buildType, systemLocale, sqlConnectionType, connManager, cameraOpener, fileSystemManager, qrCodeScanner, sentryDSN, hasSoftBackButton, supportAlternativeControls, reset, hwSerial, DEFAULT_HD_ASSETS);
}
public Tablexia(String buildType, Locale systemLocale, SQLConnectionType sqlConnectionType, IConnectionManager connManager, CameraOpener cameraOpener, IFileSystemManager fileSystemManager,
QRCodeScanner qrCodeScanner, String sentryDSN, boolean hasSoftBackButton, boolean supportAlternativeControls, boolean reset, String hwSerial, boolean hdAssets) {
this.reset = reset;
this.connectionManager = validateConnectionManager(connManager);
this.fileSystemManager = validateFileSystemManager(fileSystemManager);
......@@ -156,7 +164,7 @@ public class Tablexia extends TablexiaApplication {
this.sqlConnectionType = sqlConnectionType;
this.cameraOpener = cameraOpener;
this.sentryDSN = sentryDSN;
TablexiaSettings.init(buildType, systemLocale, hasSoftBackButton, supportAlternativeControls, hwSerial);
TablexiaSettings.init(buildType, systemLocale, hasSoftBackButton, supportAlternativeControls, hwSerial, hdAssets);
}
private void initializeBugReporting() {
......@@ -327,7 +335,10 @@ public class Tablexia extends TablexiaApplication {
// async zip extraction
assetsManager = new TablexiaAssetsManager();
assetsManager.load(locale, Utility.createChecksumMapFromString(TablexiaBuildConfig.ASSETS_HD_CHECKSUM));
assetsManager.load(locale, Utility.createChecksumMapFromString(
TablexiaSettings.getInstance().isHdAssets() ?
TablexiaBuildConfig.ASSETS_HD_CHECKSUM :
TablexiaBuildConfig.ASSETS_CHECKSUM));
// async external assets loading
ApplicationExternalSoundManager.getInstance().load();
......
......@@ -100,12 +100,15 @@ public class DesktopLauncher extends Application {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.resizable = false;
config.width = windowsResolution.getWidth();
config.width = windowsResolution.getWidth();
config.height = windowsResolution.getHeight();
config.fullscreen = fullscreen;
config.samples = MULTI_SAMPLING_2X;
config.title = TablexiaBuildConfig.APP_NAME;
// if(fullscreen) {
// System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");
// }
if (buildType == null || buildType.equals(TablexiaSettings.BuildType.DEVEL.getKey())) {
config.addIcon(DESKTOP_ICON_DEVEL_16, Files.FileType.Internal);
config.addIcon(DESKTOP_ICON_DEVEL_32, Files.FileType.Internal);
......@@ -136,7 +139,8 @@ public class DesktopLauncher extends Application {
HAS_SOFT_BACK_BUTTON,
HAS_ALTERNATIVE_CONTROLS,
true,
null);
null,
fullscreen);
new LwjglApplication(tablexia, config);
return tablexia;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment