Skip to content
Snippets Groups Projects
Commit cfa8a6fa authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#58 Main menu titles resource names refactor

parent 51fd5b31
Branches
Tags
No related merge requests found
......@@ -35,6 +35,13 @@ public class ApplicationTextManager extends TablexiaDataManager<I18NBundle> impl
public static final String LANGUAGE_SLOVAK = "language_slovak";
public static final String LANGUAGE_GERMAN = "language_german";
public static final String MAINMENU_GAMES = "mainmenu_games";
public static final String MAINMENU_HALLOFFAME = "mainmenu_halloffame";
public static final String MAINMENU_STATISTICS = "mainmenu_statistics";
public static final String MAINMENU_ENCYCLOPEDIA = "mainmenu_encyclopedia";
public static final String MAINMENU_ABOUT = "mainmenu_about";
public static final String MAINMENU_LOGOUT = "mainmenu_logout";
public static final String GAME_ROBBERY_TITLE = "game_robbery_title";
public static final String GAME_ROBBERY_DESCRIPTION = "game_robbery_description";
public static final String GAME_PURSUIT_TITLE = "game_pursuit_title";
......
......@@ -25,18 +25,18 @@ import cz.nic.tablexia.screen.viewport.ViewportDebugScreen;
public enum MainMenuDefinition implements IMenuItem {
GAMES (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_GAMES_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_GAMES_PRESSED}, "mainmenu_games", GameMenuDefinition.values(), null, null) {
GAMES (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_GAMES_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_GAMES_PRESSED}, ApplicationTextManager.ApplicationTextsAssets.MAINMENU_GAMES, GameMenuDefinition.values(), null, null) {
@Override
public void performAction() {
ApplicationBus.getInstance().post(new SubMenuControlEvent(MainMenu.class, this, SubMenuControlEvent.SubMenuAction.TOGGLE)).asynchronously();
}
},
HALL_OF_FAME (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_HALLOFFAME_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_HALLOFFAME_PRESSED}, "mainmenu_halloffame", null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(HallOfFameScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
STATISTICS (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_STATISTICS_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_STATISTICS_PRESSED}, "mainmenu_statistics", null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(StatisticsScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
ENCYCLOPEDIA (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_ENCYCLOPEDIA_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_ENCYCLOPEDIA_PRESSED}, "mainmenu_encyclopedia", null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(EncyclopediaScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
ABOUT_APPLICATION (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_ABOUT_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_ABOUT_PRESSED}, "mainmenu_about", null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(AboutScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
LOGOUT (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_LOGOUT_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_LOGOUT_PRESSED}, "mainmenu_logout", null, AbstractMenu.MenuAction.HIDE, null) {
HALL_OF_FAME (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_HALLOFFAME_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_HALLOFFAME_PRESSED}, ApplicationTextManager.ApplicationTextsAssets.MAINMENU_HALLOFFAME, null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(HallOfFameScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
STATISTICS (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_STATISTICS_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_STATISTICS_PRESSED}, ApplicationTextManager.ApplicationTextsAssets.MAINMENU_STATISTICS, null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(StatisticsScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
ENCYCLOPEDIA (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_ENCYCLOPEDIA_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_ENCYCLOPEDIA_PRESSED}, ApplicationTextManager.ApplicationTextsAssets.MAINMENU_ENCYCLOPEDIA, null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(EncyclopediaScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
ABOUT_APPLICATION (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_ABOUT_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_ABOUT_PRESSED}, ApplicationTextManager.ApplicationTextsAssets.MAINMENU_ABOUT, null, AbstractMenu.MenuAction.CLOSE, new Tablexia.ChangeScreenEvent(AboutScreen.class, TablexiaApplication.ScreenTransaction.FADE)),
LOGOUT (false, new String[]{ApplicationAtlasManager.MAINMENU_ICON_LOGOUT_UNPRESSED, ApplicationAtlasManager.MAINMENU_ICON_LOGOUT_PRESSED}, ApplicationTextManager.ApplicationTextsAssets.MAINMENU_LOGOUT, null, AbstractMenu.MenuAction.HIDE, null) {
@Override
public void performAction() {
......
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