Commit 610fbe54 authored by Luboš Horáček's avatar Luboš Horáček

#11 Difficulty chooser alignment

parent 76cc368b
......@@ -10,6 +10,10 @@ mainmenu_preferences=Nastavení
mainmenu_about=O aplikaci
mainmenu_logout=Odhlásit
gamemenu_easy=Lehká
gamemenu_medium=Střední
gamemenu_hard=Těžká
game_robbery_title=Lupiči
game_kidnapping_title=Únos
game_pursuit_title=Pronásledování
......
......@@ -10,6 +10,10 @@ mainmenu_preferences=Nastavenie
mainmenu_about=O aplikácií
mainmenu_logout=Odhlásiť
gamemenu_easy=Ľahká
gamemenu_medium=Stredná
gamemenu_hard=Ťažká
game_robbery_title=Lupiči
game_kidnapping_title=Únos
game_pursuit_title=Prenasledovanie
......
......@@ -23,11 +23,11 @@ import cz.nic.tablexia.util.Log;
import cz.nic.tablexia.util.Utility;
public class Tablexia extends TablexiaApplication {
private boolean loadingComplete = false;
private MainMenuContainer mainMenuContainer;
private ZipAssetLoader zipAssetLoader;
private boolean resetState;
private boolean loadingComplete = false;
private MainMenuContainer mainMenuContainer;
private ZipAssetLoader zipAssetLoader;
private boolean resetState;
public Tablexia(boolean debug, Locale systemLocale, String versionName, String applicationId, boolean resetState) {
TablexiaSettings.init(debug, systemLocale, versionName, applicationId);
......@@ -38,14 +38,14 @@ public class Tablexia extends TablexiaApplication {
TablexiaSettings.init(buildTypeKey, systemLocale, versionName, applicationId);
this.resetState = resetState;
}
private void loadingComplete() {
if (!loadingComplete) {
loadingComplete = true;
showLastOrInitialScreen();
ApplicationBus.getInstance().publishAsync(new ApplicationLoadingCompleteEvent());
}
}
private void loadingComplete() {
if (!loadingComplete) {
loadingComplete = true;
showLastOrInitialScreen();
ApplicationBus.getInstance().publishAsync(new ApplicationLoadingCompleteEvent());
}
}
private void showLastOrInitialScreen() {
AbstractTablexiaScreen<?> lastScreen = TablexiaSettings.getInstance().getCurrentScreen();
......@@ -59,7 +59,7 @@ public class Tablexia extends TablexiaApplication {
private void prepareMainMenu() {
mainMenuContainer = new MainMenuContainer(getStage().getWidth(), getStage().getHeight());
getStage().addActor(mainMenuContainer);
}
}
private void startLoading(Locale locale) {
// sync loaded screen with loader image
......@@ -107,24 +107,24 @@ public class Tablexia extends TablexiaApplication {
}
});
}
//////////////////////////// LIBGDX LIFECYCLE
@Override
public void create () {
super.create();
@Override
public void create() {
super.create();
TablexiaSettings.getInstance().loadPreferences(resetState);
Log.setLoglevel(TablexiaSettings.getInstance().getLogLevel());
// init event bus handlers
ApplicationBus.getInstance().subscribe(this);
ScreenDefinition.initBus();
// init event bus handlers
ApplicationBus.getInstance().subscribe(this);
ScreenDefinition.initBus();
// start loading application scope data
startLoading(TablexiaSettings.getInstance().getLocale());
}
}
@Override
public void pause() {
......@@ -136,76 +136,77 @@ public class Tablexia extends TablexiaApplication {
}
@Override
public void render () {
// render other screens
super.render();
// process loading
if (!loadingComplete) {
public void render() {
// render other screens
super.render();
// process loading
if (!loadingComplete) {
// load internal assets
if (!ApplicationFontManager.getInstance().update()) return;
if (!ApplicationTextManager.getInstance().update()) return;
// load external assets
if (!zipAssetLoader.update()) return;
if (!ApplicationTextureManager.getInstance().update()) return;
if (!ApplicationTextureManager.getInstance().update()) return;
if (!ApplicationSoundManager.getInstance().update()) return;
prepareMainMenu();
loadingComplete();
}
}
@Override
public void dispose() {
prepareMainMenu();
loadingComplete();
}
}
@Override
public void dispose() {
super.dispose();
clearLoadedData();
}
clearLoadedData();
}
//////////////////////////// APPLICATION LOADING COMPLETE EVENT
public static class ApplicationLoadingCompleteEvent implements ApplicationEvent {}
public static class ApplicationLoadingCompleteEvent implements ApplicationEvent {
}
//////////////////////////// CHANGE SCREEN EVENT
public static class ChangeScreenEvent implements ApplicationEvent {
private Class<? extends AbstractTablexiaScreen<?>> screen;
private ScreenTransaction screenTransaction;
public ChangeScreenEvent(Class<? extends AbstractTablexiaScreen<?>> screen, ScreenTransaction screenTransaction) {
this.screen = screen;
this.screenTransaction = screenTransaction;
}
public Class<? extends AbstractTablexiaScreen<?>> getScreen() {
return screen;
}
public ScreenTransaction getScreenTransaction() {
return screenTransaction;
}
}
@Handler
public void handleChangeScreenEvent(final ChangeScreenEvent changeScreenEvent) {
final Class<? extends AbstractTablexiaScreen<?>> screenClass = changeScreenEvent.getScreen();
if (!loadingComplete) {
Log.err(getClass(), "Cannot change screen -> Application loading not complete!");
return;
}
if (screenClass == null) {
Log.err(getClass(), "Cannot change screen -> Received empty screen class!");
return;
}
// create new screen on GL thread
Gdx.app.postRunnable(new Runnable() {
@Override
public void run() {
public static class ChangeScreenEvent implements ApplicationEvent {
private Class<? extends AbstractTablexiaScreen<?>> screen;
private ScreenTransaction screenTransaction;
public ChangeScreenEvent(Class<? extends AbstractTablexiaScreen<?>> screen, ScreenTransaction screenTransaction) {
this.screen = screen;
this.screenTransaction = screenTransaction;
}
public Class<? extends AbstractTablexiaScreen<?>> getScreen() {
return screen;
}
public ScreenTransaction getScreenTransaction() {
return screenTransaction;
}
}
@Handler
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!");
return;
}
if (screenClass == null) {
Log.err(((Object)this).getClass(), "Cannot change screen -> Received empty screen class!");
return;
}
// create new screen on GL thread
Gdx.app.postRunnable(new Runnable() {
@Override
public void run() {
setScreenIfIsDifferent(Utility.getScreenForScreenClass(screenClass), changeScreenEvent.getScreenTransaction());
}
});
}
}
});
}
}
package cz.nic.tablexia.game;
import cz.nic.tablexia.Tablexia.ChangeScreenEvent;
import cz.nic.tablexia.TablexiaApplication.ScreenTransaction;
import cz.nic.tablexia.bus.ApplicationBus;
import cz.nic.tablexia.bus.ApplicationBus.ApplicationEvent;
import cz.nic.tablexia.game.games.in_the_darkness.InTheDarknessScreen;
import cz.nic.tablexia.game.games.kidnapping.KidnappingScreen;
import cz.nic.tablexia.game.games.night_watch.NightWatchScreen;
import cz.nic.tablexia.game.games.pursuit.PursuitScreen;
import cz.nic.tablexia.game.games.robbery.RobberyScreen;
import cz.nic.tablexia.game.games.shooting_range.ShootingRangeScreen;
import cz.nic.tablexia.loader.application.ApplicationTextManager;
import cz.nic.tablexia.menu.IMenuItem;
import cz.nic.tablexia.screen.AbstractTablexiaScreen;
public enum GameDefinition implements ApplicationEvent, IMenuItem {
ROBBERY ("game_robbery_title", RobberyScreen.class, true),
PURSUIT ("game_pursuit_title", PursuitScreen.class, true),
KIDNAPPING ("game_kidnapping_title", KidnappingScreen.class, true),
NIGHT_WATCH ("game_night_watch_title", NightWatchScreen.class, true),
SHOOTING_RANGE ("game_shooting_range_title", ShootingRangeScreen.class, true),
IN_THE_DARKNESS ("game_in_the_darkness_title", InTheDarknessScreen.class, true);
private String menuTextKey;
private Class<? extends AbstractTablexiaScreen<?>> screenClass;
private boolean isCloseMenu;
<<<<<<< HEAD
public static GameDefinition[] getActiveGames(){
return new GameDefinition[]{ROBBERY, PURSUIT, KIDNAPPING, NIGHT_WATCH, SHOOTING_RANGE, IN_THE_DARKNESS};
}
private GameDefinition(String nameResource, Class<? extends AbstractTablexiaScreen<?>> screenClass, boolean isCloseMenu) {
=======
private GameDefinition(String nameResource, Class<? extends AbstractTablexiaGame<?>> screenClass, boolean isCloseMenu) {
>>>>>>> feature-pauseresume
this.menuTextKey = nameResource;
this.screenClass = screenClass;
this.isCloseMenu = isCloseMenu;
}
@Override
public String getTitle() {
return ApplicationTextManager.getInstance().getResult().get(menuTextKey);
}
@Override
public void performAction() {
ApplicationBus.getInstance().publishAsync(this);
ApplicationBus.getInstance().publishAsync(new ChangeScreenEvent(screenClass, ScreenTransaction.FADE));
}
@Override
public boolean isCloseMenu() {
return isCloseMenu;
}
}
......@@ -35,6 +35,10 @@ public enum ScreenDefinition {
return mainMenuDefinition;
}
public Class<? extends AbstractTablexiaScreen<?>> getScreenClass() {
return screenClass;
}
public void performMenuAction() {
ApplicationBus.getInstance().publishAsync(new ChangeScreenEvent(screenClass, ScreenTransaction.FADE));
}
......
package cz.nic.tablexia.screen;
import net.engio.mbassy.listener.Handler;
import cz.nic.tablexia.Tablexia.ChangeScreenEvent;
import cz.nic.tablexia.TablexiaApplication.ScreenTransaction;
import cz.nic.tablexia.bus.ApplicationBus;
import cz.nic.tablexia.menu.MainMenuDefinition;
import cz.nic.tablexia.screen.about.AboutScreen;
import cz.nic.tablexia.screen.encyclopedia.EncyclopediaScreen;
import cz.nic.tablexia.screen.gamemenu.GameMenuScreen;
import cz.nic.tablexia.screen.halloffame.HallOfFameScreen;
import cz.nic.tablexia.screen.preferences.PreferencesScreen;
import cz.nic.tablexia.screen.statistics.StatisticsScreen;
public enum ScreenDefinition {
<<<<<<< HEAD
GAME_MENU(GameMenuScreen.class, null),
HALL_OF_FAME(HallOfFameScreen.class, MainMenuDefinition.HALL_OF_FAME),
STATISTICS(StatisticsScreen.class, MainMenuDefinition.STATISTICS),
ENCYCLOPEDIA(EncyclopediaScreen.class, MainMenuDefinition.ENCYCLOPEDIA),
PREFERENCES(PreferencesScreen.class, MainMenuDefinition.PREFERENCES),
ABOUT_APPLICATION(AboutScreen.class, MainMenuDefinition.ABOUT_APPLICATION);
private Class<? extends AbstractTablexiaScreen<?>> screenClass;
private MainMenuDefinition mainMenuDefinition;
private static Object messageHandler;
private ScreenDefinition(Class<? extends AbstractTablexiaScreen<?>> screenClass, MainMenuDefinition mainMenuDefinition) {
this.screenClass = screenClass;
this.mainMenuDefinition = mainMenuDefinition;
}
public MainMenuDefinition getMainMenuDefinition() {
return mainMenuDefinition;
}
public void performMenuAction() {
ApplicationBus.getInstance().publishAsync(new ChangeScreenEvent(screenClass, ScreenTransaction.FADE));
}
public static ScreenDefinition getScreenDefinitionForMainMenuDefinition(MainMenuDefinition mainMenuDefinition) {
for (ScreenDefinition screenDefinition : ScreenDefinition.values()) {
if (screenDefinition.getMainMenuDefinition() == mainMenuDefinition) {
return screenDefinition;
}
}
return null;
}
public static void initBus() {
messageHandler = new Object() {
@Handler
public void handleChangeScreenEvent(MainMenuDefinition mainMenuDefinition) {
ScreenDefinition.getScreenDefinitionForMainMenuDefinition(mainMenuDefinition).performMenuAction();
}
};
ApplicationBus.getInstance().subscribe(messageHandler);
}
=======
GAME_MENU (GameMenuScreen.class, null),
HALL_OF_FAME (HallOfFameScreen.class, MainMenuDefinition.HALL_OF_FAME),
STATISTICS (StatisticsScreen.class, MainMenuDefinition.STATISTICS),
ENCYCLOPEDIA (EncyclopediaScreen.class, MainMenuDefinition.ENCYCLOPEDIA),
PREFERENCES (PreferencesScreen.class, MainMenuDefinition.PREFERENCES),
ABOUT_APPLICATION (AboutScreen.class, MainMenuDefinition.ABOUT_APPLICATION);
private Class<? extends AbstractTablexiaScreen<?>> screenClass;
private MainMenuDefinition mainMenuDefinition;
private static Object messageHandler;
private ScreenDefinition(Class<? extends AbstractTablexiaScreen<?>> screenClass, MainMenuDefinition mainMenuDefinition) {
this.screenClass = screenClass;
this.mainMenuDefinition = mainMenuDefinition;
}
public Class<? extends AbstractTablexiaScreen<?>> getScreenClass() {
return screenClass;
}
public MainMenuDefinition getMainMenuDefinition() {
return mainMenuDefinition;
}
public void performMenuAction() {
ApplicationBus.getInstance().publishAsync(new ChangeScreenEvent(screenClass, ScreenTransaction.FADE));
}
public static ScreenDefinition getScreenDefinitionForMainMenuDefinition(MainMenuDefinition mainMenuDefinition) {
for (ScreenDefinition screenDefinition : ScreenDefinition.values()) {
if (screenDefinition.getMainMenuDefinition() == mainMenuDefinition) {
return screenDefinition;
}
}
return null;
}
public static void initBus() {
messageHandler = new Object() {
@Handler
public void handleChangeScreenEvent(MainMenuDefinition mainMenuDefinition) {
ScreenDefinition.getScreenDefinitionForMainMenuDefinition(mainMenuDefinition).performMenuAction();
}
};
ApplicationBus.getInstance().subscribe(messageHandler);
}
>>>>>>> devel
}
......@@ -3,6 +3,7 @@ package cz.nic.tablexia.screen.gamemenu.pages;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
......@@ -15,6 +16,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.GameDefinition;
import cz.nic.tablexia.loader.application.ApplicationTextManager;
import cz.nic.tablexia.screen.AbstractTablexiaScreen;
import cz.nic.tablexia.screen.gamemenu.GameMenuAssets;
import cz.nic.tablexia.util.ui.ViewPager;
......@@ -27,7 +29,8 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
private GameDefinition game;
private float diffEasyX, diffMediumX, diffHardX;
private Image diffEasy, diffMedium, diffHard;
private Actor diffEasy, diffMedium, diffHard;
private Stack diffStack;
private float scrollOffset = TablexiaSettings.getDefaultScreenWidth(); // hack to keep paralax layers out of picture before scrolled for first time
......@@ -35,7 +38,6 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
super(screen);
this.game = game;
// Title
Texture title = getScreen().getTexture(GameMenuAssets.getResourcePath(game, GameMenuAssets.GameMenuLayers.TITLE));
Image titleImage = new Image(title);
......@@ -70,7 +72,6 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
addActor(startDownButton);
addActor(startButton);
startButton.addListener(new ClickListener() {
@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
......@@ -95,20 +96,10 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
}
});
// Labels for diffuculty slider
Label.LabelStyle labelStyle = new Label.LabelStyle(screen.getDefaultRegularFont(), Color.BLACK);
// TODO load texts from GameDifficulty enum
Label easy = new Label("Easy", labelStyle);
Label medium = new Label("Medium", labelStyle);
Label hard = new Label("Hard", labelStyle);
easy.setPosition((screen.getStage().getWidth() / 2) - (screen.getStage().getWidth() * 0.1f) - easy.getWidth() / 2, screen.getStage().getHeight() * 0.0f);
medium.setPosition((screen.getStage().getWidth() / 2) - medium.getWidth() / 2, screen.getStage().getHeight() * 0.0f);
hard.setPosition((screen.getStage().getWidth() / 2) + (screen.getStage().getWidth() * 0.1f) - hard.getWidth() / 2, screen.getStage().getHeight() * 0.0f);
addActor(easy);
addActor(medium);
addActor(hard);
final Texture diff = getScreen().getTexture(GameMenuAssets.DIFF_THUMB_EASY);
float diffY = screen.getStage().getHeight() * 0.06f;
float diffHeight = screen.getStage().getHeight() * 0.12f;
float diffWidth = diffHeight * ((float) diff.getWidth() / (float) diff.getHeight());
// Difficulty bar
Texture diffBar = getScreen().getTexture(GameMenuAssets.DIFF_BAR);
......@@ -117,27 +108,36 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
int diffBarHeight = (int) (screen.getStage().getHeight() * 0.04f);
int diffBarWidth = (int) (diffBarHeight * ((float) diffBar.getWidth() / (float) diffBar.getHeight()));
int diffBarX = (int) screen.getStage().getWidth() / 2 - diffBarWidth / 2;
int diffBarY = (int) (screen.getStage().getHeight() * 0.1 - diffBarHeight);
int diffBarY = (int) (screen.getStage().getHeight() * 0.1);
diffBarImage.setPosition(diffBarX, diffBarY);
diffBarImage.setSize(diffBarWidth, diffBarHeight);
addActor(diffBarImage);
// Difficulty button
diffMediumX = (screen.getStage().getWidth() / 2) - (diffWidth / 2);
diffEasyX = diffMediumX - (diffBarWidth / 2) + (diffWidth * 0.1f);
diffHardX = diffMediumX + (diffBarWidth / 2) - (diffWidth * 0.1f);
// Labels for diffuculty slider
BitmapFont font = screen.getDefaultRegularFont();
font.setScale(0.5f);
Label.LabelStyle labelStyle = new Label.LabelStyle(font, Color.BLACK);
final Texture diff = getScreen().getTexture(GameMenuAssets.DIFF_THUMB_EASY);
Label easy = new Label(ApplicationTextManager.getInstance().getText("gamemenu_easy"), labelStyle);
Label medium = new Label(ApplicationTextManager.getInstance().getText("gamemenu_medium"), labelStyle);
Label hard = new Label(ApplicationTextManager.getInstance().getText("gamemenu_hard"), labelStyle);
float labelY = screen.getStage().getHeight() * 0.06f;
float labelAddX = diffWidth / 2;
easy.setPosition(diffEasyX + labelAddX - easy.getWidth() / 2, labelY);
medium.setPosition(diffMediumX + labelAddX - medium.getWidth() / 2, labelY);
hard.setPosition(diffHardX + labelAddX - hard.getWidth() / 2, labelY);
float diffY = screen.getStage().getHeight() * 0.02f;
float diffHeight = screen.getStage().getHeight() * 0.12f;
float diffWidth = diffHeight * ((float) diff.getWidth() / (float) diff.getHeight());
diffMediumX = (screen.getStage().getWidth() / 2) - (diffWidth / 2) + (int) (diffWidth * 0.1f);
diffEasyX = diffMediumX - diffBarWidth / 2;
diffHardX = diffMediumX + diffBarWidth / 2;
final Stack diffStack = new Stack();
addActor(easy);
addActor(medium);
addActor(hard);
// Difficulty button
diffStack = new Stack();
diffStack.addActor(diffEasy = new Image(diff));
diffStack.addActor(diffMedium = new Image(getScreen().getTexture(GameMenuAssets.DIFF_THUMB_MEDIUM)));
diffStack.addActor(diffHard = new Image(getScreen().getTexture(GameMenuAssets.DIFF_THUMB_HARD)));
......@@ -146,6 +146,7 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
diffStack.setSize(diffWidth, diffHeight);
diffStack.setPosition(diffX, diffY);
addActor(diffStack);
fixDiffImage();
diffStack.addListener(new InputListener() {
float lastX;
......@@ -165,19 +166,7 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
if (bx >= diffEasyX && bx <= diffHardX) {
diffStack.setPosition(bx, diffStack.getY());
}
if (bx < diffMediumX) {
if ((diffEasyX + ((diffMediumX - diffEasyX) / 2)) > bx) {
showDifficulty(diffEasy);
} else {
showDifficulty(diffMedium);
}
} else {
if ((diffMediumX + ((diffHardX - diffMediumX) / 2)) > bx) {
showDifficulty(diffMedium);
} else {
showDifficulty(diffHard);
}
}
fixDiffImage();
event.stop();
}
......@@ -186,26 +175,57 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
super.touchUp(event, x, y, pointer, button);
float bx = diffStack.getX() + (x - lastX);
MoveToAction ma = new MoveToAction();
if (bx < diffMediumX) {
if ((diffEasyX + ((diffMediumX - diffEasyX) / 2)) > bx) {
switch (getDifficulty()) {
case 0:
ma.setPosition(diffEasyX, diffStack.getY());
} else {
ma.setPosition(diffMediumX, diffStack.getY());
}
} else {
if ((diffMediumX + ((diffHardX - diffMediumX) / 2)) > bx) {
break;
case 1:
ma.setPosition(diffMediumX, diffStack.getY());
} else {
break;
case 2:
ma.setPosition(diffHardX, diffStack.getY());
}
break;
}
diffStack.addAction(ma);
event.stop();
}
});
setDebug(true);
}
private void fixDiffImage() {
switch (getDifficulty()) {
case 0:
showDifficulty(diffEasy);
break;
case 1:
showDifficulty(diffMedium);
break;
case 2:
showDifficulty(diffHard);
break;
}
}
private int getDifficulty() {
float bx = diffStack.getX();
if (bx < diffMediumX) {
if ((diffEasyX + ((diffMediumX - diffEasyX) / 2)) > bx) {
return 0;
} else {
return 1;
}
} else {
if ((diffMediumX + ((diffHardX - diffMediumX) / 2)) > bx) {
return 1;
} else {
return 2;
}
}
}
private void showDifficulty(Image diff) {
private void showDifficulty(Actor diff) {
diffEasy.setVisible(false);
diffMedium.setVisible(false);
diffHard.setVisible(false);
......
package cz.nic.tablexia.screen.gamemenu.pages;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.Group;
import cz.nic.tablexia.screen.AbstractTablexiaScreen;
......@@ -17,4 +18,12 @@ public abstract class MenuPage extends Group {
protected AbstractTablexiaScreen getScreen() {
return screen;
}
@Override
public void setDebug(boolean enabled) {
super.setDebug(enabled);
for (Actor a : getChildren()) {
a.setDebug(enabled);
}
}
}
package cz.nic.tablexia;
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.foundation.NSBundle;
import org.robovm.apple.foundation.NSDictionary;
import org.robovm.apple.foundation.NSString;
import org.robovm.apple.uikit.UIApplication;
import java.util.Locale;
public class IOSLauncher extends IOSApplication.Delegate {
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
<<<<<<< HEAD
NSDictionary infoDictionary = NSBundle.getMainBundle().getInfoDictionary();
String buildType = infoDictionary.get(new NSString("cz.nic.tablexia.BuildType")).toString();
String versionName = infoDictionary.get(new NSString("CFBundleShortVersionString")).toString();
String applicationId = infoDictionary.get(new NSString("CFBundleIdentifier")).toString();
return new IOSApplication(new Tablexia(buildType, Locale.getDefault(), versionName, applicationId), config);
=======
return new IOSApplication(new Tablexia(null, Locale.getDefault(), null, null, false), config);