Commit 8d33cf69 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

Merge branch 'V3.6.3' into 907-doplnit-gdpr

parents 5a0ed053 0b6ee040
...@@ -15,47 +15,68 @@ ...@@ -15,47 +15,68 @@
before_script: before_script:
- ./gradlew unlockIOSKeyChain - ./gradlew unlockIOSKeyChain
- git submodule update --init --recursive - git submodule update --init --recursive
stages: stages:
- build - build
- unitTest - unitTest
- iTest-desktop - iTest-desktop
pre-release:
# Development build
# Runs for every commit
# Connects to development server
dev_debug:
stage: build stage: build
only: except:
- master - tags
- devel
script: script:
- ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true -PTABLEXIA_ASSETS_OPTIMIZE=true
artifacts: artifacts:
expire_in: 2 weeks
paths: paths:
- android/build/outputs/apk/*debug*.apk - android/build/outputs/apk/*debug*.apk
- android/build/outputs/apk/*iTest*.apk - android/build/outputs/apk/*iTest*.apk
- ios/build/robovm/*debug*.ipa - ios/build/robovm/*debug*.ipa
- ios/build/robovm/*iTest*.ipa - ios/build/robovm/*iTest*.ipa
- desktop/build/libs/*debug*.jar - desktop/build/libs/*debug*.jar
- desktop/build/libs/*iTest*.jar
- desktop/build/libs/*debug*.deb # Release debug build
- desktop/build/outputs/*debug*.exe # Runs only on tags
- desktop/build/outputApp/*debug*.app # Connects to development server
debug: release-debug:
stage: build stage: build
except: only:
- pre-release - tags
- release
script: script:
- ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true -PTABLEXIA_HD_ASSETS=true - ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true -PTABLEXIA_HD_ASSETS=true -PTABLEXIA_ASSETS_OPTIMIZE=true
artifacts: artifacts:
expire_in: 2 weeks
paths: paths:
- android/build/outputs/apk/*debug*.apk - android/build/outputs/apk/*debug*.apk
- android/build/outputs/apk/*iTest*.apk
- ios/build/robovm/*debug*.ipa - ios/build/robovm/*debug*.ipa
- ios/build/robovm/*iTest*.ipa - desktop/build/libs/*debug*.deb
- desktop/build/libs/*debug*.jar - desktop/build/outputs/*debug*.exe
# Actual release build
# Runs only on tags
# Connects to production server
# -PTABLEXIA_RELEASE_BUILD=true - Tells Tablexia to use production server
release:
stage: build
only:
- tags
script:
- ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true -PTABLEXIA_HD_ASSETS=true -PTABLEXIA_RELEASE_BUILD=true -PTABLEXIA_ASSETS_OPTIMIZE=true
artifacts:
paths:
- android/build/outputs/apk/*release*.apk
- ios/build/robovm/*release*.ipa
- desktop/build/libs/*release*.deb
- desktop/build/outputs/*release*.exe
unitTest: unitTest:
stage: unitTest stage: unitTest
script: script:
- ./gradlew test -x prepareAssets -x prepareGraphicAssets -x prepareSoundAssets -x prepareJsonAssets -x processAssets -x runChecksum - ./gradlew test -x prepareAssets -x prepareGraphicAssets -x prepareSoundAssets -x prepareJsonAssets -x processAssets -x runChecksum
iTest-desktop: iTest-desktop:
stage: iTest-desktop stage: iTest-desktop
script: script:
...@@ -66,17 +87,3 @@ iTest-desktop: ...@@ -66,17 +87,3 @@ iTest-desktop:
paths: paths:
- desktop/build/libs/iTest_results/*.log - desktop/build/libs/iTest_results/*.log
- desktop/build/libs/iTest_results/*error.png - desktop/build/libs/iTest_results/*error.png
\ No newline at end of file
release:
stage: build
only:
- tags
script:
- ./gradlew clean assemble -PTABLEXIA_ASSETS_UPLOAD=true
artifacts:
paths:
- android/build/outputs/apk/*release*.apk
- ios/build/robovm/*release*.ipa
- desktop/build/libs/*release*.jar
- desktop/build/libs/*release*.deb
- desktop/build/outputs/*release*.exe
- desktop/build/outputApp/*release*.app
...@@ -72,13 +72,13 @@ allprojects { ...@@ -72,13 +72,13 @@ allprojects {
masterBranch = 'master' masterBranch = 'master'
applicationBaseId = 'cz.nic.tablexia' applicationBaseId = 'cz.nic.tablexia'
tablexiaAppName = getTablexiaAppName() tablexiaAppName = getTablexiaAppName()
assetsDebugURLPart = onMaster() ? '' : 'debug/' assetsDebugURLPart = isReleaseBuild() ? '' : 'debug/'
assetsDownloadUrl = project.hasProperty("TABLEXIA_ASSETS_DOWNLOAD_URL") ? ("${TABLEXIA_ASSETS_DOWNLOAD_URL}/${assetsDebugURLPart}") : "<NO_URL_CONFIGURED>/" assetsDownloadUrl = project.hasProperty("TABLEXIA_ASSETS_DOWNLOAD_URL") ? ("${TABLEXIA_ASSETS_DOWNLOAD_URL}/${assetsDebugURLPart}") : "<NO_URL_CONFIGURED>/"
assetsUploadURL = (project.hasProperty("TABLEXIA_ASSETS_UPLOAD_USER") && project.hasProperty("TABLEXIA_ASSETS_UPLOAD_URL")) ? "${TABLEXIA_ASSETS_UPLOAD_USER}@${TABLEXIA_ASSETS_UPLOAD_URL}/${assetsDebugURLPart}" : "<NO_URL_CONFIGURED>/" assetsUploadURL = (project.hasProperty("TABLEXIA_ASSETS_UPLOAD_USER") && project.hasProperty("TABLEXIA_ASSETS_UPLOAD_URL")) ? "${TABLEXIA_ASSETS_UPLOAD_USER}@${TABLEXIA_ASSETS_UPLOAD_URL}/${assetsDebugURLPart}" : "<NO_URL_CONFIGURED>/"
serverFallbackHost = "<NO_SERVER_HOST>" serverFallbackHost = "<NO_SERVER_HOST>"
serverHost = onMaster() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_PRODUCTION", serverFallbackHost) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_DEBUG", serverFallbackHost) serverHost = isReleaseBuild() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_PRODUCTION", serverFallbackHost) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_DEBUG", serverFallbackHost)
serverSecretFallback = ""; serverSecretFallback = ""
serverSecret = onMaster() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_PRODUCTION", serverSecretFallback) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_DEBUG", serverSecretFallback); serverSecret = isReleaseBuild() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_PRODUCTION", serverSecretFallback) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_DEBUG", serverSecretFallback);
tablexiaVersionName = getVersionNameFromGit(TABLEXIA_GIT_PATH) tablexiaVersionName = getVersionNameFromGit(TABLEXIA_GIT_PATH)
tablexiaVersionCode = getVersionCodeFromGit(TABLEXIA_GIT_PATH) tablexiaVersionCode = getVersionCodeFromGit(TABLEXIA_GIT_PATH)
tablexiaModelVersionName = getVersionNameFromGit(MODEL_GIT_PATH) tablexiaModelVersionName = getVersionNameFromGit(MODEL_GIT_PATH)
...@@ -94,7 +94,7 @@ allprojects { ...@@ -94,7 +94,7 @@ allprojects {
//Fallback value if sentry DSN is not defined (gradle parameter SENTRY_DSN_DEBUG or SENTRY_DSN_RELEASE) //Fallback value if sentry DSN is not defined (gradle parameter SENTRY_DSN_DEBUG or SENTRY_DSN_RELEASE)
sentryDSNFallbackValue = "None" sentryDSNFallbackValue = "None"
sentryDSN = onMaster() ? getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_RELEASE", sentryDSNFallbackValue) : getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_DEBUG", sentryDSNFallbackValue) sentryDSN = isReleaseBuild() ? getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_RELEASE", sentryDSNFallbackValue) : getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_DEBUG", sentryDSNFallbackValue)
gdxVersion = '1.9.6' gdxVersion = '1.9.6'
gdxUtilsVersion = '0.13.2' gdxUtilsVersion = '0.13.2'
...@@ -209,10 +209,11 @@ task prepareHdAssets(dependsOn: prepareAssets) { ...@@ -209,10 +209,11 @@ task prepareHdAssets(dependsOn: prepareAssets) {
inputs.dir(hdSourceDir.absolutePath) inputs.dir(hdSourceDir.absolutePath)
inputs.dir(sourceDir.absolutePath)
outputs.dir("${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsSourceDirName}/") outputs.dir("${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsSourceDirName}/")
doLast { doLast {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) { if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
new File("${assetsDir}/${assetsSourceDirName}/").eachDir() { langDir -> new File("${assetsDir}/${assetsSourceDirName}/").eachDir() { langDir ->
langDir.eachDir() { sectionDir -> langDir.eachDir() { sectionDir ->
...@@ -306,6 +307,25 @@ task prepareGraphicAssets(dependsOn: prepareAssets) { ...@@ -306,6 +307,25 @@ task prepareGraphicAssets(dependsOn: prepareAssets) {
} }
} }
} }
//optimizing for uploading
if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) {
println "ASSETS OPTIMIZATION: ENABLED."
println "ASSETS OPTIMIZATION: START."
new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir ->
dir.eachFileRecurse() { file ->
if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) {
println "Optimizing: ${file.name}"
exec {
commandLine 'pngquant', '--ext', '.png', '--nofs', '-f', 256, file.absolutePath
}
}
}
}
println "ASSETS OPTIMIZATION: FINISH."
} else {
println "ASSETS OPTIMIZATION NOT CONFIGURED -> SKIPPING OPTIMIZATION"
}
} }
} }
...@@ -338,7 +358,7 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) { ...@@ -338,7 +358,7 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) {
outputs.dir("${assetsDir.absolutePath}/${assetsDestinationDirName}/") outputs.dir("${assetsDir.absolutePath}/${assetsDestinationDirName}/")
doLast { doLast {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) { if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
TexturePacker.Settings settings = new TexturePacker.Settings(); TexturePacker.Settings settings = new TexturePacker.Settings();
settings.pot = false; settings.pot = false;
settings.maxWidth = 2048; settings.maxWidth = 2048;
...@@ -387,6 +407,23 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) { ...@@ -387,6 +407,23 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) {
}.execute() }.execute()
} }
} }
} //optimizing for uploading
if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) {
println "HD ASSETS OPTIMIZATION: ENABLED."
println "HD ASSETS OPTIMIZATION: START."
new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir ->
dir.eachFileRecurse() { file ->
if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) {
println "Optimizing: ${file.name}"
exec {
commandLine 'pngquant', '--ext', '.png', '--nofs', '-f', 256, file.absolutePath
}
}
}
}
println "HD ASSETS OPTIMIZATION: FINISH."
} else {
println "ASSETS OPTIMIZATION NOT CONFIGURED -> SKIPPING OPTIMIZATION"
} }
} else { } else {
println "HD PACK IS NOT REQUESTED" println "HD PACK IS NOT REQUESTED"
...@@ -396,7 +433,7 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) { ...@@ -396,7 +433,7 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) {
task zipHdAssets(dependsOn: prepareHdGraphicAssets) { task zipHdAssets(dependsOn: prepareHdGraphicAssets) {
doLast { doLast {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) { if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
new File(project(":core").projectDir.absolutePath + "/${assetsDirName}/").eachDir() { dir -> new File(project(":core").projectDir.absolutePath + "/${assetsDirName}/").eachDir() { dir ->
if (!dir.name.equals('common')) { if (!dir.name.equals('common')) {
...@@ -415,7 +452,7 @@ task zipHdAssets(dependsOn: prepareHdGraphicAssets) { ...@@ -415,7 +452,7 @@ task zipHdAssets(dependsOn: prepareHdGraphicAssets) {
task processAssets(dependsOn: [':util:checksum:runChecksum', ':util:checksum:runAssetsArchivesChecksum']) { task processAssets(dependsOn: [':util:checksum:runChecksum', ':util:checksum:runAssetsArchivesChecksum']) {
doLast { doLast {
if (project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD') && Boolean.valueOf(TABLEXIA_ASSETS_UPLOAD).booleanValue()) { if (project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD') && Boolean.valueOf(project.property('TABLEXIA_ASSETS_UPLOAD')).booleanValue()) {
def data = new URL(project.assetsDownloadUrl).getText() def data = new URL(project.assetsDownloadUrl).getText()
rootProject.ext.assetsPackDir.eachFile() { file -> rootProject.ext.assetsPackDir.eachFile() { file ->
String fileName = file.getName() String fileName = file.getName()
...@@ -450,8 +487,8 @@ task prepareHdPack(dependsOn: [':util:checksum:runHdChecksum', ':util:checksum:r ...@@ -450,8 +487,8 @@ task prepareHdPack(dependsOn: [':util:checksum:runHdChecksum', ':util:checksum:r
project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') &&
project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') &&
project.hasProperty('TABLEXIA_ASSETS_UPLOAD') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD') &&
Boolean.valueOf(TABLEXIA_ASSETS_UPLOAD).booleanValue() && Boolean.valueOf(project.property('TABLEXIA_ASSETS_UPLOAD')).booleanValue() &&
Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) { Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
def data = new URL(project.assetsDownloadUrl).getText() def data = new URL(project.assetsDownloadUrl).getText()
rootProject.ext.assetsHdPackDir.eachFile() { file -> rootProject.ext.assetsHdPackDir.eachFile() { file ->
...@@ -495,7 +532,7 @@ def getPropertyValueOrFallbackValue(String key, String fallbackValue) { ...@@ -495,7 +532,7 @@ def getPropertyValueOrFallbackValue(String key, String fallbackValue) {
} }
def getTablexiaAppName() { def getTablexiaAppName() {
if (onMaster()) { if (isReleaseBuild()) {
return "${project.appName}" return "${project.appName}"
} else { } else {
return "${project.appName} (${getBranchNameFromGit()})" return "${project.appName} (${getBranchNameFromGit()})"
...@@ -503,7 +540,7 @@ def getTablexiaAppName() { ...@@ -503,7 +540,7 @@ def getTablexiaAppName() {
} }
def getTablexiaAppId() { def getTablexiaAppId() {
if (onMaster()) { if (isReleaseBuild()) {
return "" return ""
} else { } else {
return ".${getBranchNameFromGit().trim().replaceAll('-', '').replaceAll('\\.', '').toLowerCase()}" return ".${getBranchNameFromGit().trim().replaceAll('-', '').replaceAll('\\.', '').toLowerCase()}"
...@@ -522,7 +559,7 @@ def getVersionNameFromGit(String relativePath) { ...@@ -522,7 +559,7 @@ def getVersionNameFromGit(String relativePath) {
String result = stdout.toString().trim(); String result = stdout.toString().trim();
// for non release branches add number of commits and branch name // for non release branches add number of commits and branch name
if (!onMaster()) { if (!isReleaseBuild()) {
stdout = new ByteArrayOutputStream() stdout = new ByteArrayOutputStream()
exec { exec {
workingDir relativePath workingDir relativePath
...@@ -559,8 +596,8 @@ def getBranchNameFromGit() { ...@@ -559,8 +596,8 @@ def getBranchNameFromGit() {
return branchString.contains("/") ? branchString.substring(branchString.lastIndexOf("/") + 1) : branchString return branchString.contains("/") ? branchString.substring(branchString.lastIndexOf("/") + 1) : branchString
} }
boolean onMaster() { boolean isReleaseBuild() {
return project.masterBranch.equals(getBranchNameFromGit()); return project.hasProperty('TABLEXIA_RELEASE_BUILD') && Boolean.valueOf(project.property('TABLEXIA_RELEASE_BUILD')).booleanValue()
} }
def getMapConvertedToString(Map map) { def getMapConvertedToString(Map map) {
......
...@@ -32,8 +32,8 @@ import net.engio.mbassy.listener.Handler; ...@@ -32,8 +32,8 @@ import net.engio.mbassy.listener.Handler;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -186,15 +186,16 @@ public class Tablexia extends TablexiaApplication { ...@@ -186,15 +186,16 @@ public class Tablexia extends TablexiaApplication {
} }
private void initializeLogging() { private void initializeLogging() {
if(TablexiaSettings.getInstance().getBuildType().isLogFile()) { if (TablexiaSettings.getInstance().getBuildType().isLogFile()) {
try { try {
File file = new File(TablexiaAbstractFileManager.RootStorageType.LOCAL.getStoragePath(), LOG_FILE_NAME); File file = TablexiaAbstractFileManager.RootStorageType.LOCAL.getResolver().resolve(TablexiaAbstractFileManager.RootStorageType.LOCAL.getStoragePath() + LOG_FILE_NAME).file();
if(file.exists()) file.mkdirs(); if (file.exists()) file.delete();
file.getParentFile().mkdirs();
file.createNewFile();
PrintStream stream = new PrintStream(new FileOutputStream(file)); PrintStream stream = new PrintStream(new FileOutputStream(file));
TeeStream teeStream = new TeeStream(System.out, stream); TeeStream teeStream = new TeeStream(System.out, stream);
System.setOut(new PrintStream(teeStream)); System.setOut(new PrintStream(teeStream));
} catch (FileNotFoundException e) { } catch (IOException e) {
Log.info(getClass(), "Cannot create a log file!"); Log.info(getClass(), "Cannot create a log file!");
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -463,8 +463,8 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> { ...@@ -463,8 +463,8 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> {
highlightedGameObjectLayer.addActor(gameObject); highlightedGameObjectLayer.addActor(gameObject);
gameObject.getAction().setBounds(0, 0, ACTION_CARD_EXTRA_LARGE, ACTION_CARD_EXTRA_LARGE); gameObject.getAction().setBounds(0, 0, ACTION_CARD_EXTRA_LARGE, ACTION_CARD_EXTRA_LARGE);
gameObject.setPosition(getViewportWidth() / 2 - ACTION_CARD_EXTRA_LARGE / 2 - actionsStripWidget.getWidth() / 2, gameObject.setPosition(getViewportWidth() / 2 - gameObject.getAction().getWidth() / 2 - actionsStripWidget.getWidth() / 2,
getViewportHeight() / 2 - ACTION_CARD_EXTRA_LARGE / 2); getViewportHeight() / 2 - gameObject.getAction().getHeight() / 2);
setDimmerVisible(true); setDimmerVisible(true);
replayMusic(gameObject); replayMusic(gameObject);
......
...@@ -24,12 +24,14 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent; ...@@ -24,12 +24,14 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.utils.DragListener; import com.badlogic.gdx.scenes.scene2d.utils.DragListener;
import com.badlogic.gdx.utils.Timer; import com.badlogic.gdx.utils.Timer;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.AbstractTablexiaGame; import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.util.entity.Touch; import cz.nic.tablexia.util.entity.Touch;
class DesktopCrimeSceneAction extends CrimeSceneAction { class DesktopCrimeSceneAction extends CrimeSceneAction {
private static final float DELAY = 0.15f; private static final float DELAY = 0.15f;
private static final float DEFAULT_DESKTOP_DOWNSCALE = 0.45f;
private Touch lastRecordedTouchDown; private Touch lastRecordedTouchDown;
private boolean lastTapValid; private boolean lastTapValid;
...@@ -40,6 +42,9 @@ class DesktopCrimeSceneAction extends CrimeSceneAction { ...@@ -40,6 +42,9 @@ class DesktopCrimeSceneAction extends CrimeSceneAction {
public DesktopCrimeSceneAction(String texturePath, int orderNumber, int actionSize, AbstractTablexiaGame tablexiaGame, int actionNumber, GameObject gameObject) { public DesktopCrimeSceneAction(String texturePath, int orderNumber, int actionSize, AbstractTablexiaGame tablexiaGame, int actionNumber, GameObject gameObject) {
super(texturePath, orderNumber, actionSize, tablexiaGame, actionNumber, gameObject); super(texturePath, orderNumber, actionSize, tablexiaGame, actionNumber, gameObject);
if (TablexiaSettings.getInstance().isUseHdAssets()){
setSize(getWidth() * DEFAULT_DESKTOP_DOWNSCALE, getHeight() * DEFAULT_DESKTOP_DOWNSCALE);
}
timer = new Timer(); timer = new Timer();
} }
......
...@@ -27,6 +27,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image; ...@@ -27,6 +27,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.Align;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.games.protocol.ProtocolGame; import cz.nic.tablexia.game.games.protocol.ProtocolGame;
import cz.nic.tablexia.game.games.protocol.controller.RoomPosition; import cz.nic.tablexia.game.games.protocol.controller.RoomPosition;