diff --git a/android/build.gradle b/android/build.gradle index 68f4b35b7ab4a55f28d547c5bd7ed8568ce911e3..e4e35dcdbaf5e6259bcb8f28fe3a20cc0fa728a5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,8 +4,16 @@ final BUILD_CONFIG_DIR = "${buildDir}/generated/source/buildConfig/" final BUILD_CONFIG_ENCODING = 'UTF-8' android { - buildToolsVersion "21.1.2" - compileSdkVersion 21 + buildToolsVersion "20.0.0" + compileSdkVersion 20 + + defaultConfig { + targetSdkVersion 20 + versionName tablexiaVersionName + versionCode tablexiaVersionCode + applicationId rootProject.applicationIdRelease + testApplicationId rootProject.applicationIdRelease + ".test" + } buildTypes { debug { @@ -26,12 +34,17 @@ android { sourceSets { main { manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['src'] - aidl.srcDirs = ['src'] - renderscript.srcDirs = ['src'] res.srcDirs = ['res/main'] assets.srcDirs = ['assets'] + java.srcDir file('src/main/java') + } + androidTest { + java.srcDir file('src/androidTest/java') } + test { + java.srcDir file('src/test/java') + } + release { res.srcDirs = ['res/release'] } @@ -41,14 +54,6 @@ android { devel { res.srcDirs = ['res/devel'] } - - instrumentTest.setRoot('tests') - } - - defaultConfig { - versionName tablexiaVersionName - versionCode tablexiaVersionCode - applicationId rootProject.applicationIdRelease } assemble.dependsOn = ['assembleRelease', 'assembleDebug'] @@ -83,6 +88,27 @@ android { sourceCompatibility JavaVersion.VERSION_1_6 targetCompatibility JavaVersion.VERSION_1_6 } + + command { + // list manufacturer and model for all attached devices + task('uninstallAllDevices') << { + devices().each { + applicationVariants.all { variant -> + if (variant.buildType.name.equals("debug")) { + variant.outputs.each { output -> + print "Uninstalling " + variant.name + "(" + variant.applicationId + ") from device " + it.id + ": .. " + [adb, '-s', it.id, 'shell', 'pm', 'uninstall', variant.applicationId].execute() + println "done" + } + } + } + // Uninstall test apk + print "Uninstalling test(" + defaultConfig.testApplicationId + ") from device " + it.id + ": .. " + [adb, '-s', it.id, 'shell', 'pm', 'uninstall', defaultConfig.testApplicationId].execute() + println "done" + } + } + } } // hack to add assets checksum to BuildConfig -> build config fields are generated at script startup @@ -150,6 +176,7 @@ task copyAndroidNatives() { } } } + task run(type: Exec) { def path def localProperties = project.file("../local.properties") @@ -172,36 +199,6 @@ task run(type: Exec) { commandLine "$adb", 'shell', 'am', 'start', '-n', 'cz.nic.tablexia.android/cz.nic.tablexia.android.AndroidLauncher' } -// sets up the Android Eclipse project, using the old Ant based build. -eclipse { - // need to specify Java source sets explicitely, SpringSource Gradle Eclipse plugin - // ignores any nodes added in classpath.file.withXml - sourceSets { - main { - java.srcDirs "src", 'gen' - } - } - - jdt { - sourceCompatibility = 1.6 - targetCompatibility = 1.6 - } - - classpath { - plusConfigurations += [project.configurations.compile] - containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES' - } - - project { - name = appName + "-android" - natures 'com.android.ide.eclipse.adt.AndroidNature' - buildCommands.clear(); - buildCommand "com.android.ide.eclipse.adt.ResourceManagerBuilder" - buildCommand "com.android.ide.eclipse.adt.PreCompilerBuilder" - buildCommand "org.eclipse.jdt.core.javabuilder" - buildCommand "com.android.ide.eclipse.adt.ApkBuilder" - } -} // sets up the Android Idea project, using the old Ant based build. idea { module { @@ -224,5 +221,11 @@ idea { } } } -dependencies { + +spoon { + debug = true + failOnFailure = false + //testSizes = ['small', 'medium'] + adbTimeout = 10*60 + failIfNoDeviceConnected = false } \ No newline at end of file diff --git a/android/src/androidTest/java/cz/nic/tablexia/android/test/instrumentation/AbstractOpenglTest.java b/android/src/androidTest/java/cz/nic/tablexia/android/test/instrumentation/AbstractOpenglTest.java new file mode 100644 index 0000000000000000000000000000000000000000..8af96415f1970c7f602f9b433b605b5fd56bc160 --- /dev/null +++ b/android/src/androidTest/java/cz/nic/tablexia/android/test/instrumentation/AbstractOpenglTest.java @@ -0,0 +1,42 @@ +package cz.nic.tablexia.android.test.instrumentation; + +import android.test.ActivityInstrumentationTestCase2; + +import com.squareup.spoon.Spoon; + +import java.io.File; + +import cz.nic.tablexia.android.AndroidLauncher; + +/** + * Created by lhoracek on 5/13/15. + */ +public abstract class AbstractOpenglTest<T extends AndroidLauncher> extends ActivityInstrumentationTestCase2<T> { + public AbstractOpenglTest(Class<T> activityClass) { + super(activityClass); + } + + /** + * Sleep the thread to wait for animations to complete + * + * @param seconds + */ + protected void sleep(float seconds) { + try { + Thread.sleep((int) (seconds * 1000)); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * Take screenshot using custom OpenGL readPixels buffer method instead of using decorView. Lets the Spoon create the file first and then just overwrites it. + * Not the best method, but the simplest. + * @param name + */ + protected void screenshot(String name) { + File screenshot = Spoon.screenshot(getActivity(), name); + getActivity().takeScreenshot(screenshot); + sleep(3); + } +} diff --git a/android/src/androidTest/java/cz/nic/tablexia/android/test/instrumentation/ScreenTest.java b/android/src/androidTest/java/cz/nic/tablexia/android/test/instrumentation/ScreenTest.java new file mode 100644 index 0000000000000000000000000000000000000000..0f282a3555bcb60f7e849c838c4a646a4b18515f --- /dev/null +++ b/android/src/androidTest/java/cz/nic/tablexia/android/test/instrumentation/ScreenTest.java @@ -0,0 +1,21 @@ +package cz.nic.tablexia.android.test.instrumentation; + +import android.test.suitebuilder.annotation.SmallTest; + +import cz.nic.tablexia.android.AndroidLauncher; + +public class ScreenTest extends AbstractOpenglTest<AndroidLauncher> { + + public ScreenTest() { + super(AndroidLauncher.class); + } + + @SmallTest + public void testScreenshot() throws Throwable { + final AndroidLauncher act = getActivity(); + sleep(10); + screenshot("startup"); + sleep(10); + screenshot("startup"); + } +} diff --git a/android/src/cz/nic/tablexia/android/AndroidLauncher.java b/android/src/cz/nic/tablexia/android/AndroidLauncher.java deleted file mode 100644 index b384eb2bd640342643ea9c8d5e56bb4e452634ef..0000000000000000000000000000000000000000 --- a/android/src/cz/nic/tablexia/android/AndroidLauncher.java +++ /dev/null @@ -1,27 +0,0 @@ -package cz.nic.tablexia.android; - -import android.os.Bundle; - -import com.badlogic.gdx.backends.android.AndroidApplication; -import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; - -import cz.nic.tablexia.Tablexia; -import cz.nic.tablexia.debug.BuildConfig; -import cz.nic.tablexia.util.Utility; - -public class AndroidLauncher extends AndroidApplication { - - public static final Tablexia.SQLConnectionType SQL_CONNECTION_TYPE = new Tablexia.SQLConnectionType("org.sqldroid.SQLDroidDriver", "jdbc:sqldroid:"); - - @Override - protected void onCreate (Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); - initialize(new Tablexia(BuildConfig.BUILD_TYPE, - getResources().getConfiguration().locale, - BuildConfig.VERSION_NAME, - SQL_CONNECTION_TYPE, - Utility.createChecksumMapFromString(BuildConfig.ASSETS_CHECKSUMS), - savedInstanceState == null), config); - } -} diff --git a/android/src/main/java/cz/nic/tablexia/android/AndroidLauncher.java b/android/src/main/java/cz/nic/tablexia/android/AndroidLauncher.java new file mode 100644 index 0000000000000000000000000000000000000000..13b2d485bae8878c5391a19c74aed0c2c3431fa4 --- /dev/null +++ b/android/src/main/java/cz/nic/tablexia/android/AndroidLauncher.java @@ -0,0 +1,64 @@ +package cz.nic.tablexia.android; + +import android.graphics.Bitmap; +import android.graphics.Matrix; +import android.os.Bundle; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.backends.android.AndroidApplication; +import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; + +import java.io.File; +import java.io.FileOutputStream; + +import cz.nic.tablexia.Tablexia; +import cz.nic.tablexia.debug.BuildConfig; +import cz.nic.tablexia.util.Log; + +public class AndroidLauncher extends AndroidApplication { + + private Tablexia tablexia; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); + initialize(tablexia = new Tablexia(BuildConfig.BUILD_TYPE, getResources().getConfiguration().locale, BuildConfig.VERSION_NAME, savedInstanceState == null), config); + } + + /** + * Method supporting screenshots during UI testing the application using OpenGL + * + * @param file + */ + public void takeScreenshot(final File file) { + tablexia.takeScreenShot(new Tablexia.ScreenshotListener() { + @Override + public void screenshotTaken(int[] screen) { + int width = Gdx.graphics.getWidth(); + int height = Gdx.graphics.getHeight(); + try { + for (int i = 0; i < screen.length; ++i) { + // The alpha and green channels' positions are preserved while the red and blue are swapped + screen[i] = ((screen[i] & 0xff00ff00)) | ((screen[i] & 0x000000ff) << 16) | ((screen[i] & 0x00ff0000) >> 16); + } + Bitmap sb = Bitmap.createBitmap(screen, width, height, Bitmap.Config.RGB_565); + // flip bitmap vertically + Matrix matrixMirror = new Matrix(); + matrixMirror.preScale(1.0f, -1.0f); + sb = Bitmap.createBitmap(sb, 0, 0, sb.getWidth(), sb.getHeight(), matrixMirror, false); + // overvrite file + FileOutputStream fOut = new FileOutputStream(file); + sb.compress(Bitmap.CompressFormat.PNG, 100, fOut); + sb.recycle(); + fOut.flush(); + fOut.close(); + } catch (Exception e) { + e.printStackTrace(); + Log.err(this.getClass().getSimpleName(), e.getMessage()); + } + } + }); + } + +} diff --git a/build.gradle b/build.gradle index 48a3fdb701a2b5690c2e49c1a90c0b7519ea8312..6117ee068cc55256d6bd24c9e643293ce6b2e108 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,11 @@ buildscript { } dependencies { classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6' - classpath 'com.android.tools.build:gradle:1.0.0' - classpath 'org.robovm:robovm-gradle-plugin:1.0.0' + classpath 'com.android.tools.build:gradle:1.2.3' + classpath 'org.robovm:robovm-gradle-plugin:1.2.0' + classpath 'de.felixschulze.gradle:gradle-spoon-plugin:2.1' + classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0' + classpath 'com.novoda:gradle-android-command-plugin:1.3.0' } } @@ -31,10 +34,10 @@ allprojects { applicationIdDevelSuffix = '.devel' applicationIdDevel = applicationIdRelease + applicationIdDevelSuffix - gdxVersion = '1.5.5' + gdxVersion = '1.6.1' gdxUtilsVersion = '0.9.1' mbassadorVersion = '1.2.0' - roboVMVersion = '1.0.0' + roboVMVersion = '1.2.0' box2DLightsVersion = '1.3' ashleyVersion = '1.3.1' aiVersion = '1.4.0' @@ -108,7 +111,10 @@ project(":desktop") { } project(":android") { + apply plugin: 'android-sdk-manager' apply plugin: "android" + apply plugin: "spoon" + apply plugin: 'android-command' configurations { natives } @@ -124,6 +130,10 @@ project(":android") { natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" + + testCompile 'org.robolectric:robolectric:2.3' + androidTestCompile "com.squareup.spoon:spoon-client:1.1.7" + androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.3.1' } } @@ -140,8 +150,8 @@ project(":ios") { compile "net.engio:mbassador:$mbassadorVersion" compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" - natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios" - natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" + compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios" + compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" } } diff --git a/core/src/cz/nic/tablexia/Tablexia.java b/core/src/cz/nic/tablexia/Tablexia.java index 690e56f3d0ea8659c18330e55c4e74ed749da018..52a79aaee2d1ce5920c683b04d0b0733f747dee1 100644 --- a/core/src/cz/nic/tablexia/Tablexia.java +++ b/core/src/cz/nic/tablexia/Tablexia.java @@ -2,9 +2,12 @@ package cz.nic.tablexia; import com.badlogic.gdx.Application; import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.GL30; import net.engio.mbassy.listener.Handler; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; import java.util.Locale; import java.util.Map; @@ -164,11 +167,17 @@ public class Tablexia extends TablexiaApplication { super.pause(); } + @Override public void render() { // render other screens super.render(); + if (screenshotListener != null) { + obtainScreenshot(); + screenshotListener = null; + } + // process loading if (!loadingComplete) { // load internal assets @@ -184,6 +193,42 @@ public class Tablexia extends TablexiaApplication { } } + ScreenshotListener screenshotListener; + + /** + * Queues request for screenshot with this listener, it is called after obtaining screenshot. + * + * @param listener + */ + public void takeScreenShot(ScreenshotListener listener) { + this.screenshotListener = listener; + } + + /** + * Listener interface, that gets called after creating screenshot array + */ + public static interface ScreenshotListener { + public void screenshotTaken(int[] screen); + } + + /** + * Method launched during render phase before cleaning the buffer, creates bytearray of screen pixels and passes it to the listener + */ + private void obtainScreenshot() { + Gdx.gl.glFinish(); + int width = Gdx.graphics.getWidth(); + int height = Gdx.graphics.getHeight(); + int bt[] = new int[width * height]; + + ByteBuffer pbuf = ByteBuffer.allocateDirect(width * height * 4); + pbuf.order(ByteOrder.nativeOrder()); + Gdx.gl.glReadPixels(0, 0, width, height, GL30.GL_RGBA, GL30.GL_UNSIGNED_BYTE, pbuf); + pbuf.asIntBuffer().get(bt); + if (screenshotListener != null) { + screenshotListener.screenshotTaken(bt); + } + } + @Override public void dispose() { super.dispose(); @@ -223,11 +268,11 @@ public class Tablexia extends TablexiaApplication { public void handleChangeScreenEvent(final ChangeScreenEvent changeScreenEvent) { final Class<? extends AbstractTablexiaScreen<?>> screenClass = changeScreenEvent.getScreen(); if (!loadingComplete) { - Log.err(((Object)this).getClass(), "Cannot change screen -> Application loading not complete!"); + Log.err(((Object) this).getClass(), "Cannot change screen -> Application loading not complete!"); return; } if (screenClass == null) { - Log.err(((Object)this).getClass(), "Cannot change screen -> Received empty screen class!"); + Log.err(((Object) this).getClass(), "Cannot change screen -> Received empty screen class!"); return; } // create new screen on GL thread diff --git a/core/src/cz/nic/tablexia/TablexiaApplication.java b/core/src/cz/nic/tablexia/TablexiaApplication.java index 56fc7a4eae1d289bb500ad59ad57acc9faf7fbf3..927c2bbe011d0421c68ce1c4cb8d40c9e8b8eea2 100644 --- a/core/src/cz/nic/tablexia/TablexiaApplication.java +++ b/core/src/cz/nic/tablexia/TablexiaApplication.java @@ -27,7 +27,7 @@ import static com.badlogic.gdx.scenes.scene2d.actions.Actions.run; import static com.badlogic.gdx.scenes.scene2d.actions.Actions.sequence; /** - * Abstract Tablexia libGDX application listener with screen transactions implementation. + * Abstract Tablexia libGDX application screenshotListener with screen transactions implementation. * * @author Matyáš Latner */ diff --git a/core/src/cz/nic/tablexia/game/games/robbery/GameScreen.java b/core/src/cz/nic/tablexia/game/games/robbery/GameScreen.java index 19cab3e6fe52aa738d0f4a1911ae03a5ddb5689e..fc04cf305f4aa95e3af04714a8b0ad59c81e6548 100644 --- a/core/src/cz/nic/tablexia/game/games/robbery/GameScreen.java +++ b/core/src/cz/nic/tablexia/game/games/robbery/GameScreen.java @@ -1,16 +1,5 @@ package cz.nic.tablexia.game.games.robbery; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.alpha; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.fadeIn; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.fadeOut; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.moveTo; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.parallel; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.run; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.scaleTo; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.sequence; - -import java.util.List; - import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; @@ -21,15 +10,26 @@ import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.Group; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.InputListener; -import com.badlogic.gdx.scenes.scene2d.utils.Align; +import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.reflect.ClassReflection; import com.badlogic.gdx.utils.reflect.ReflectionException; +import java.util.List; + import cz.nic.tablexia.game.games.robbery.assets.RobberyAssets; import cz.nic.tablexia.game.games.robbery.creature.CreatureRoot; import cz.nic.tablexia.screen.AbstractTablexiaScreen; import cz.nic.tablexia.util.Log; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.alpha; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.fadeIn; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.fadeOut; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.moveTo; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.parallel; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.run; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.scaleTo; +import static com.badlogic.gdx.scenes.scene2d.actions.Actions.sequence; + public class GameScreen extends AbstractTablexiaScreen<Void> { private static class GameBackground extends Actor { diff --git a/core/src/cz/nic/tablexia/game/games/robbery/RobberyScreen.java b/core/src/cz/nic/tablexia/game/games/robbery/RobberyScreen.java index 590cc2ed7e5d72cbf2e593eeb96bae1fe0cc8aac..f843e409ea40713ba8e07bf5f65efe302f4e4e36 100644 --- a/core/src/cz/nic/tablexia/game/games/robbery/RobberyScreen.java +++ b/core/src/cz/nic/tablexia/game/games/robbery/RobberyScreen.java @@ -293,6 +293,8 @@ public class RobberyScreen extends AbstractTablexiaGame<GameRule> { private void processNewScreen(AbstractTablexiaScreen<Void> newScreen) { AbstractTablexiaScreen<Void> lastScreen = actualScreen; actualScreen = newScreen; + + inputMultiplexer.addProcessor(newScreen.getInputProcessor()); newScreen.show(); if (lastScreen != null) { diff --git a/core/src/cz/nic/tablexia/menu/MainMenu.java b/core/src/cz/nic/tablexia/menu/MainMenu.java index 9bd2e24a680129d42d525feaa03763ec7536f9d9..ae258facec6ac7386e66ee7c2d98c2ed5c4e707d 100644 --- a/core/src/cz/nic/tablexia/menu/MainMenu.java +++ b/core/src/cz/nic/tablexia/menu/MainMenu.java @@ -14,9 +14,9 @@ import com.badlogic.gdx.scenes.scene2d.ui.Stack; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle; -import com.badlogic.gdx.scenes.scene2d.utils.Align; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; +import com.badlogic.gdx.utils.Align; import cz.nic.tablexia.TablexiaSettings; import cz.nic.tablexia.bus.ApplicationBus; diff --git a/core/src/cz/nic/tablexia/screen/gamemenu/pages/GameMenuPage.java b/core/src/cz/nic/tablexia/screen/gamemenu/pages/GameMenuPage.java index 6c51ba47b5e84fbf5a71ac02bc541f9bd36c7dea..99b0dbb255c170bc08a822b671d61abea4e6166f 100644 --- a/core/src/cz/nic/tablexia/screen/gamemenu/pages/GameMenuPage.java +++ b/core/src/cz/nic/tablexia/screen/gamemenu/pages/GameMenuPage.java @@ -122,7 +122,7 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener { // Labels for diffuculty slider BitmapFont font = screen.getDefaultBoldFont(); - font.setScale(0.5f); + //font.setScale(0.5f); // TODO make text smaller Label.LabelStyle labelStyle = new Label.LabelStyle(font, Color.BLACK); Label easy = new Label(GameDifficulty.EASY.getTextDescription(), labelStyle); diff --git a/core/src/cz/nic/tablexia/util/ui/dialog/TextDialog.java b/core/src/cz/nic/tablexia/util/ui/dialog/TextDialog.java index ccd69cbeb24048f6d0389342db44d09c635faa06..1fccc0fbf1587316a0514b6aa725cf0a3ffd6145 100644 --- a/core/src/cz/nic/tablexia/util/ui/dialog/TextDialog.java +++ b/core/src/cz/nic/tablexia/util/ui/dialog/TextDialog.java @@ -22,14 +22,16 @@ public class TextDialog extends TablexiaDialog { @Override protected void prepareContent() { Label.LabelStyle titleLabelStyle = new Label.LabelStyle(ApplicationFontManager.getInstance().getFont(ApplicationFontManager.APPLICATION_DEFAULT_FONT_BOLD), Color.BLACK); - titleLabelStyle.font.setScale(TITLE_FONT_SCALE); + // TODO fix scaling + //titleLabelStyle.font.setScale(TITLE_FONT_SCALE); if(dialogTextContent.getTitle() != null && !dialogTextContent.getTitle().equals("")){ Label titleLabel = new Label(dialogTextContent.getTitle(),titleLabelStyle); getContentTable().add(titleLabel).center() ; getContentTable().row(); } Label.LabelStyle contentLabelStyle = new Label.LabelStyle(ApplicationFontManager.getInstance().getFont(ApplicationFontManager.APPLICATION_DEFAULT_FONT_REGULAR), Color.BLACK); - contentLabelStyle.font.setScale(CONTENT_FONT_SCALE); + // TODO fix scaling + //contentLabelStyle.font.setScale(CONTENT_FONT_SCALE); Label label = new Label(dialogTextContent.getContent(),contentLabelStyle); label.setWrap(true); getContentTable().add(label).left().top().expand().fillX();