From 20105d09ec965f08ee873dc54436fac3f17b211f Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 Sep 2015 20:20:24 +0200 Subject: [PATCH] Added code battles button to the main menu --- po/colobot.pot | 19 ++++---- po/de.po | 36 ++++++++++----- po/fr.po | 36 ++++++++++----- po/pl.po | 31 +++++++------ po/ru.po | 36 ++++++++++----- src/common/event.cpp | 1 + src/common/event.h | 1 + src/common/restext.cpp | 28 ++++++------ src/common/restext.h | 25 +++++----- src/level/level_category.cpp | 3 ++ src/level/level_category.h | 11 +++-- src/ui/maindialog.cpp | 2 +- src/ui/screen/screen_level_list.cpp | 20 ++++---- src/ui/screen/screen_main_menu.cpp | 71 +++++++++++++++-------------- 14 files changed, 188 insertions(+), 132 deletions(-) diff --git a/po/colobot.pot b/po/colobot.pot index 4528e30f..9a91b810 100644 --- a/po/colobot.pot +++ b/po/colobot.pot @@ -68,6 +68,9 @@ msgstr "" msgid "User levels" msgstr "" +msgid "Code battles" +msgstr "" + msgid "Options" msgstr "" @@ -89,7 +92,10 @@ msgstr "" msgid " Planets:" msgstr "" -msgid " User levels:" +msgid " Custom levels:" +msgstr "" + +msgid " Levels in this chapter:" msgstr "" msgid " Exercises in the chapter:" @@ -104,9 +110,6 @@ msgstr "" msgid " Free game on this planet:" msgstr "" -msgid " Missions on this level:" -msgstr "" - msgid " Summary:" msgstr "" @@ -309,7 +312,10 @@ msgstr "" msgid "Free game\\Free game without a specific goal" msgstr "" -msgid "User\\User levels" +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "" + +msgid "Custom levels\\Levels from mods created by the users" msgstr "" msgid "Change player\\Change player" @@ -572,9 +578,6 @@ msgstr "" msgid "OK\\Choose the selected player" msgstr "" -msgid "Cancel\\Keep current player name" -msgstr "" - msgid "Delete player\\Deletes the player from the list" msgstr "" diff --git a/po/de.po b/po/de.po index 69d3bd0c..9a4ab2e7 100644 --- a/po/de.po +++ b/po/de.po @@ -26,6 +26,10 @@ msgstr " Liste der Challenges des Kapitels:" msgid " Chapters:" msgstr " Liste der Kapitel:" +#, fuzzy +msgid " Custom levels:" +msgstr " Userlevels:" + msgid " Drivers:" msgstr " Driver:" @@ -35,8 +39,9 @@ msgstr " Liste der Übungen des Kapitels:" msgid " Free game on this planet:" msgstr " Liste der freien Levels des Planeten:" -msgid " Missions on this level:" -msgstr " Missionen des Userlevels:" +#, fuzzy +msgid " Levels in this chapter:" +msgstr " Liste der Übungen des Kapitels:" msgid " Missions on this planet:" msgstr " Liste der Missionen des Planeten:" @@ -50,9 +55,6 @@ msgstr " Auflösung:" msgid " Summary:" msgstr " Zusammenfassung:" -msgid " User levels:" -msgstr " Userlevels:" - msgid " or " msgstr " oder " @@ -371,9 +373,6 @@ msgstr "Abbrechen" msgid "Cancel\\Cancel all changes" msgstr "Abbrechen\\Editor schließen" -msgid "Cancel\\Keep current player name" -msgstr "Abbrechen\\Behält den bisherigen Spieler bei" - msgid "Challenges" msgstr "Challenges" @@ -408,6 +407,12 @@ msgstr "Schließen" msgid "Closing bracket missing " msgstr "Es fehlt eine geschlossene Klammer \")\"" +msgid "Code battles" +msgstr "" + +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "" + msgid "Colobot rules!" msgstr "Colobot ist wunderbar!" @@ -445,6 +450,9 @@ msgstr "Kopieren (Ctrl+c)" msgid "Current mission saved" msgstr "Mission gespeichert" +msgid "Custom levels\\Levels from mods created by the users" +msgstr "" + msgid "Customize your appearance" msgstr "Aussehen einstellen" @@ -1643,9 +1651,6 @@ msgstr "Joystick\\Joystick oder Tastatur" msgid "User levels" msgstr "Userlevels" -msgid "User\\User levels" -msgstr "User\\Userlevels" - msgid "Variable name missing" msgstr "Es fehlt der Name einer Variable" @@ -1862,12 +1867,18 @@ msgstr "www.epsitec.com" #~ msgid " " #~ msgstr " " +#~ msgid " Missions on this level:" +#~ msgstr " Missionen des Userlevels:" + #~ msgid "3D sound\\3D positioning of the sound" #~ msgstr "3D-Geräusche\\Orten der Geräusche im Raum" #~ msgid "COLOBOT" #~ msgstr "COLOBOT" +#~ msgid "Cancel\\Keep current player name" +#~ msgstr "Abbrechen\\Behält den bisherigen Spieler bei" + #~ msgid "Compass" #~ msgstr "Kompass" @@ -1929,5 +1940,8 @@ msgstr "www.epsitec.com" #~ msgid "Textures\\Quality of textures " #~ msgstr "Qualität der Texturen\\Qualität der Anzeige" +#~ msgid "User\\User levels" +#~ msgstr "User\\Userlevels" + #~ msgid "\\Return to COLOBOT" #~ msgstr "\\Zurück zu COLOBOT" diff --git a/po/fr.po b/po/fr.po index f0bffa55..69164e3d 100644 --- a/po/fr.po +++ b/po/fr.po @@ -22,6 +22,10 @@ msgstr " Liste des défis du chapitre :" msgid " Chapters:" msgstr " Liste des chapitres :" +#, fuzzy +msgid " Custom levels:" +msgstr " Niveaux supplémentaires :" + msgid " Drivers:" msgstr " Pilotes :" @@ -31,8 +35,9 @@ msgstr " Liste des exercices du chapitre :" msgid " Free game on this planet:" msgstr " Liste des jeux libres du chapitre :" -msgid " Missions on this level:" -msgstr " Missions du niveau :" +#, fuzzy +msgid " Levels in this chapter:" +msgstr " Liste des exercices du chapitre :" msgid " Missions on this planet:" msgstr " Liste des missions du chapitre :" @@ -46,9 +51,6 @@ msgstr " Résolutions :" msgid " Summary:" msgstr " Résumé :" -msgid " User levels:" -msgstr " Niveaux supplémentaires :" - msgid " or " msgstr " ou " @@ -366,9 +368,6 @@ msgstr "Annuler" msgid "Cancel\\Cancel all changes" msgstr "Annuler\\Annuler toutes les modifications" -msgid "Cancel\\Keep current player name" -msgstr "Annuler\\Conserver le joueur actuel" - msgid "Challenges" msgstr "Défis" @@ -403,6 +402,12 @@ msgstr "Fermer" msgid "Closing bracket missing " msgstr "Il manque une parenthèse fermante" +msgid "Code battles" +msgstr "" + +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "" + msgid "Colobot rules!" msgstr "Colobot est super!" @@ -440,6 +445,9 @@ msgstr "Copier (Ctrl+c)" msgid "Current mission saved" msgstr "Enregistrement effectué" +msgid "Custom levels\\Levels from mods created by the users" +msgstr "" + msgid "Customize your appearance" msgstr "Personnalisation de votre apparence" @@ -1638,9 +1646,6 @@ msgstr "Utilise un joystick\\Joystick ou clavier" msgid "User levels" msgstr "Niveaux supplémentaires" -msgid "User\\User levels" -msgstr "Suppl.\\Niveaux supplémentaires" - msgid "Variable name missing" msgstr "Nom d'une variable attendu" @@ -1858,12 +1863,18 @@ msgstr "www.epsitec.com" #~ msgid " " #~ msgstr " " +#~ msgid " Missions on this level:" +#~ msgstr " Missions du niveau :" + #~ msgid "3D sound\\3D positioning of the sound" #~ msgstr "Bruitages 3D\\Positionnement sonore dans l'espace" #~ msgid "COLOBOT" #~ msgstr "COLOBOT" +#~ msgid "Cancel\\Keep current player name" +#~ msgstr "Annuler\\Conserver le joueur actuel" + #~ msgid "Compass" #~ msgstr "Boussole" @@ -1925,5 +1936,8 @@ msgstr "www.epsitec.com" #~ msgid "Textures\\Quality of textures " #~ msgstr "Qualité des textures\\Qualité des images" +#~ msgid "User\\User levels" +#~ msgstr "Suppl.\\Niveaux supplémentaires" + #~ msgid "\\Return to COLOBOT" #~ msgstr "\\Retourner dans COLOBOT" diff --git a/po/pl.po b/po/pl.po index d16e4679..58c39d8d 100644 --- a/po/pl.po +++ b/po/pl.po @@ -27,6 +27,9 @@ msgstr " Wyzwania w tym rozdziale:" msgid " Chapters:" msgstr " Rozdziały:" +msgid " Custom levels:" +msgstr " Własne poziomy:" + msgid " Drivers:" msgstr " Sterowniki:" @@ -36,8 +39,8 @@ msgstr " Ćwiczenia w tym rozdziale:" msgid " Free game on this planet:" msgstr " Swobodna gra na tej planecie:" -msgid " Missions on this level:" -msgstr " Misje na tym poziomie:" +msgid " Levels in this chapter:" +msgstr " Poziomy w tym rozdziale:" msgid " Missions on this planet:" msgstr " Misje na tej planecie:" @@ -51,9 +54,6 @@ msgstr " Rozdzielczość:" msgid " Summary:" msgstr " Streszczenie:" -msgid " User levels:" -msgstr " Poziomy użytkownika:" - msgid " or " msgstr " lub " @@ -376,9 +376,6 @@ msgstr "Anuluj" msgid "Cancel\\Cancel all changes" msgstr "Anuluj\\Pomija wszystkie zmiany" -msgid "Cancel\\Keep current player name" -msgstr "Anuluj\\Zachowuje bieżące imię gracza" - msgid "Challenges" msgstr "Wyzwania" @@ -412,6 +409,12 @@ msgstr "Zamknij" msgid "Closing bracket missing " msgstr "Brak nawiasu zamykającego" +msgid "Code battles" +msgstr "" + +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "" + msgid "Colobot rules!" msgstr "Colobot rządzi!" @@ -448,6 +451,9 @@ msgstr "Kopiuj (Ctrl+C)" msgid "Current mission saved" msgstr "Bieżąca misja zapisana" +msgid "Custom levels\\Levels from mods created by the users" +msgstr "Własne poziomy\\Poziomy z modyfikacji stworzonych przez użytkowników" + msgid "Customize your appearance" msgstr "Dostosuj wygląd" @@ -1356,9 +1362,8 @@ msgstr "Pokaż rozwiązanie" msgid "Sign \" : \" missing" msgstr "Brak znaku \" :\"" -#, fuzzy msgid "Simple shadows\\Shadows spots on the ground" -msgstr "Proste cienie\\Cienie na ziemi" +msgstr "Proste cienie\\Proste cienie na ziemi" msgid "Size 1" msgstr "Wielkość 1" @@ -1638,9 +1643,6 @@ msgstr "Używaj joysticka\\Joystick lub klawiatura" msgid "User levels" msgstr "Poziomy użytkownika" -msgid "User\\User levels" -msgstr "Poziomy\\Poziomy użytkownika" - msgid "Variable name missing" msgstr "Brak nazwy zmiennej" @@ -1857,6 +1859,9 @@ msgstr "www.epsitec.com" #~ msgid "3D sound\\3D positioning of the sound" #~ msgstr "Dźwięk 3D\\Przestrzenne pozycjonowanie dźwięków" +#~ msgid "Cancel\\Keep current player name" +#~ msgstr "Anuluj\\Zachowuje bieżące imię gracza" + #~ msgid "Compass" #~ msgstr "Kompas" diff --git a/po/ru.po b/po/ru.po index e42c7b77..ec41616b 100644 --- a/po/ru.po +++ b/po/ru.po @@ -24,6 +24,10 @@ msgstr " Задачи к главе:" msgid " Chapters:" msgstr " Разделы:" +#, fuzzy +msgid " Custom levels:" +msgstr " Пользовательские уровни:" + msgid " Drivers:" msgstr " Драйверы:" @@ -33,8 +37,9 @@ msgstr " Упражнения в разделе:" msgid " Free game on this planet:" msgstr " Свободная игра на этой планете:" -msgid " Missions on this level:" -msgstr " Миссии на этом уровне:" +#, fuzzy +msgid " Levels in this chapter:" +msgstr " Упражнения в разделе:" msgid " Missions on this planet:" msgstr "Миссии на этой планете:" @@ -48,9 +53,6 @@ msgstr " Разрешение:" msgid " Summary:" msgstr " Итог:" -msgid " User levels:" -msgstr " Пользовательские уровни:" - msgid " or " msgstr " или " @@ -366,9 +368,6 @@ msgstr "Отмена" msgid "Cancel\\Cancel all changes" msgstr "Отмена\\Отменить все изменения" -msgid "Cancel\\Keep current player name" -msgstr "Отмена\\Отмена" - msgid "Challenges" msgstr "Задания" @@ -403,6 +402,12 @@ msgstr "Закрыть" msgid "Closing bracket missing " msgstr "Закрывающая скобка отсутствует" +msgid "Code battles" +msgstr "" + +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "" + msgid "Colobot rules!" msgstr "Правила игры!" @@ -439,6 +444,9 @@ msgstr "Копировать (Ctrl+C)" msgid "Current mission saved" msgstr "Текущая миссия сохранена" +msgid "Custom levels\\Levels from mods created by the users" +msgstr "" + msgid "Customize your appearance" msgstr "Настроить свой внешний вид" @@ -1635,9 +1643,6 @@ msgstr "Использовать джойстик\\Джойстик или кл msgid "User levels" msgstr "Пользовательские уровни" -msgid "User\\User levels" -msgstr "Польз.\\Пользовательские уровни" - msgid "Variable name missing" msgstr "Нет имени переменной" @@ -1854,12 +1859,18 @@ msgstr "www.epsitec.com" #~ msgid " " #~ msgstr " " +#~ msgid " Missions on this level:" +#~ msgstr " Миссии на этом уровне:" + #~ msgid "3D sound\\3D positioning of the sound" #~ msgstr "3D-звук\\Стерео звук" #~ msgid "COLOBOT" #~ msgstr "КОЛОБОТ" +#~ msgid "Cancel\\Keep current player name" +#~ msgstr "Отмена\\Отмена" + #~ msgid "Compass" #~ msgstr "Компас" @@ -1921,5 +1932,8 @@ msgstr "www.epsitec.com" #~ msgid "Textures\\Quality of textures " #~ msgstr "Текстуры\\Качество текстур " +#~ msgid "User\\User levels" +#~ msgstr "Польз.\\Пользовательские уровни" + #~ msgid "\\Return to COLOBOT" #~ msgstr "\\Вернуться в COLOBOT" diff --git a/src/common/event.cpp b/src/common/event.cpp index 38613832..b41d6b5e 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -167,6 +167,7 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_INTERFACE_DEFI] = "EVENT_INTERFACE_DEFI"; EVENT_TYPE_TEXT[EVENT_INTERFACE_MISSION] = "EVENT_INTERFACE_MISSION"; EVENT_TYPE_TEXT[EVENT_INTERFACE_FREE] = "EVENT_INTERFACE_FREE"; + EVENT_TYPE_TEXT[EVENT_INTERFACE_CODE_BATTLES] = "EVENT_INTERFACE_CODE_BATTLES"; EVENT_TYPE_TEXT[EVENT_INTERFACE_NAME] = "EVENT_INTERFACE_NAME"; EVENT_TYPE_TEXT[EVENT_INTERFACE_SETUP] = "EVENT_INTERFACE_SETUP"; EVENT_TYPE_TEXT[EVENT_INTERFACE_QUIT] = "EVENT_INTERFACE_QUIT"; diff --git a/src/common/event.h b/src/common/event.h index 9340e2dc..f8cedf8a 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -191,6 +191,7 @@ enum EventType EVENT_INTERFACE_DEFI = 401, EVENT_INTERFACE_MISSION = 402, EVENT_INTERFACE_FREE = 403, + EVENT_INTERFACE_CODE_BATTLES = 404, EVENT_INTERFACE_NAME = 405, EVENT_INTERFACE_SETUP = 406, EVENT_INTERFACE_QUIT = 407, diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 7e81cfc6..7e6acff1 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -65,31 +65,28 @@ void InitializeRestext() stringsText[RT_IO_NEW] = TR("New ..."); stringsText[RT_KEY_OR] = TR(" or "); - stringsText[RT_TITLE_BASE] = TR("Colobot: Gold Edition"); - stringsText[RT_TITLE_INIT] = TR("Colobot: Gold Edition"); + stringsText[RT_TITLE_APPNAME] = TR("Colobot: Gold Edition"); stringsText[RT_TITLE_TRAINER] = TR("Programming exercises"); stringsText[RT_TITLE_DEFI] = TR("Challenges"); stringsText[RT_TITLE_MISSION] = TR("Missions"); stringsText[RT_TITLE_FREE] = TR("Free game"); stringsText[RT_TITLE_USER] = TR("User levels"); + stringsText[RT_TITLE_CODE_BATTLES]=TR("Code battles"); stringsText[RT_TITLE_SETUP] = TR("Options"); stringsText[RT_TITLE_NAME] = TR("Player's name"); stringsText[RT_TITLE_PERSO] = TR("Customize your appearance"); stringsText[RT_TITLE_WRITE] = TR("Save the current mission"); stringsText[RT_TITLE_READ] = TR("Load a saved mission"); - stringsText[RT_PLAY_CHAPt] = TR(" Chapters:"); - stringsText[RT_PLAY_CHAPd] = TR(" Chapters:"); - stringsText[RT_PLAY_CHAPm] = TR(" Planets:"); - stringsText[RT_PLAY_CHAPf] = TR(" Planets:"); - stringsText[RT_PLAY_CHAPu] = TR(" User levels:"); - stringsText[RT_PLAY_CHAPte] = TR(" Chapters:"); - stringsText[RT_PLAY_LISTt] = TR(" Exercises in the chapter:"); - stringsText[RT_PLAY_LISTd] = TR(" Challenges in the chapter:"); - stringsText[RT_PLAY_LISTm] = TR(" Missions on this planet:"); - stringsText[RT_PLAY_LISTf] = TR(" Free game on this planet:"); - stringsText[RT_PLAY_LISTu] = TR(" Missions on this level:"); - stringsText[RT_PLAY_RESUME] = TR(" Summary:"); + stringsText[RT_PLAY_CHAP_CHAPTERS] = TR(" Chapters:"); + stringsText[RT_PLAY_CHAP_PLANETS] = TR(" Planets:"); + stringsText[RT_PLAY_CHAP_USERLVL] = TR(" Custom levels:"); + stringsText[RT_PLAY_LIST_LEVELS] = TR(" Levels in this chapter:"); + stringsText[RT_PLAY_LIST_EXERCISES] = TR(" Exercises in the chapter:"); + stringsText[RT_PLAY_LIST_CHALLENGES] = TR(" Challenges in the chapter:"); + stringsText[RT_PLAY_LIST_MISSIONS] = TR(" Missions on this planet:"); + stringsText[RT_PLAY_LIST_FREEGAME] = TR(" Free game on this planet:"); + stringsText[RT_PLAY_RESUME] = TR(" Summary:"); stringsText[RT_SETUP_DEVICE] = TR(" Drivers:"); stringsText[RT_SETUP_MODE] = TR(" Resolution:"); @@ -173,7 +170,8 @@ void InitializeRestext() stringsEvent[EVENT_INTERFACE_DEFI] = TR("Challenges\\Programming challenges"); stringsEvent[EVENT_INTERFACE_MISSION] = TR("Missions\\Select mission"); stringsEvent[EVENT_INTERFACE_FREE] = TR("Free game\\Free game without a specific goal"); - stringsEvent[EVENT_INTERFACE_USER] = TR("User\\User levels"); + stringsEvent[EVENT_INTERFACE_CODE_BATTLES] = TR("Code battles\\Program your robot to be the best of them all!"); + stringsEvent[EVENT_INTERFACE_USER] = TR("Custom levels\\Levels from mods created by the users"); stringsEvent[EVENT_INTERFACE_NAME] = TR("Change player\\Change player"); stringsEvent[EVENT_INTERFACE_SETUP] = TR("Options\\Preferences"); stringsEvent[EVENT_INTERFACE_AGAIN] = TR("Restart\\Restart the mission from the beginning"); diff --git a/src/common/restext.h b/src/common/restext.h index 1f386867..30067cce 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -60,12 +60,12 @@ enum ResTextType RT_IO_NEW = 22, RT_KEY_OR = 23, - RT_TITLE_BASE = 40, - RT_TITLE_INIT = 41, + RT_TITLE_APPNAME = 40, RT_TITLE_TRAINER = 42, RT_TITLE_DEFI = 43, RT_TITLE_MISSION = 44, RT_TITLE_FREE = 45, + RT_TITLE_CODE_BATTLES = 46, RT_TITLE_SETUP = 47, RT_TITLE_NAME = 48, RT_TITLE_PERSO = 49, @@ -73,18 +73,15 @@ enum ResTextType RT_TITLE_READ = 51, RT_TITLE_USER = 52, - RT_PLAY_CHAPt = 60, - RT_PLAY_CHAPd = 61, - RT_PLAY_CHAPm = 62, - RT_PLAY_CHAPf = 63, - RT_PLAY_LISTt = 65, - RT_PLAY_LISTd = 66, - RT_PLAY_LISTm = 67, - RT_PLAY_LISTf = 68, - RT_PLAY_RESUME = 70, - RT_PLAY_CHAPu = 71, - RT_PLAY_LISTu = 72, - RT_PLAY_CHAPte = 73, + RT_PLAY_CHAP_CHAPTERS = 60, + RT_PLAY_CHAP_PLANETS = 61, + RT_PLAY_CHAP_USERLVL = 62, + RT_PLAY_LIST_LEVELS = 63, + RT_PLAY_LIST_EXERCISES = 64, + RT_PLAY_LIST_CHALLENGES = 65, + RT_PLAY_LIST_MISSIONS = 66, + RT_PLAY_LIST_FREEGAME = 67, + RT_PLAY_RESUME = 68, RT_SETUP_DEVICE = 80, RT_SETUP_MODE = 81, diff --git a/src/level/level_category.cpp b/src/level/level_category.cpp index 769968e0..a1b5ece6 100644 --- a/src/level/level_category.cpp +++ b/src/level/level_category.cpp @@ -21,11 +21,14 @@ #include +// NOTE: Because of how save filenames are built, the first letter of category directories MUST be unique!! +// TODO: I'm not sure about "challenges" + "custom". It may be messing things up already right now. const std::map CATEGORY_DIR_MAP = { { LevelCategory::Missions, "missions" }, { LevelCategory::FreeGame, "freemissions" }, { LevelCategory::Exercises, "exercises" }, { LevelCategory::Challenges, "challenges" }, + { LevelCategory::CodeBattles, "battles" }, { LevelCategory::CustomLevels, "custom" }, { LevelCategory::Win, "win" }, diff --git a/src/level/level_category.h b/src/level/level_category.h index 8c7de13c..3ead4813 100644 --- a/src/level/level_category.h +++ b/src/level/level_category.h @@ -23,11 +23,12 @@ enum class LevelCategory { - Exercises = 0, - Challenges = 1, - Missions = 2, - FreeGame = 3, - CustomLevels = 4, + Exercises, + Challenges, + Missions, + FreeGame, + CodeBattles, + CustomLevels, Max, // These are special types not runnable by the user diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index a55e866c..def29925 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -385,7 +385,7 @@ void CMainDialog::StartDialog(Math::Point dim, bool fireParticles) pw = m_interface->CreateWindows(pos, dim, m_dialogFireParticles ? 12 : 8, EVENT_WINDOW9); pw->SetState(STATE_SHADOW); std::string name; - GetResource(RES_TEXT, RT_TITLE_BASE, name); + GetResource(RES_TEXT, RT_TITLE_APPNAME, name); pw->SetName(name); m_dialogPos = pos; diff --git a/src/ui/screen/screen_level_list.cpp b/src/ui/screen/screen_level_list.cpp index 48d5dd18..799fe84b 100644 --- a/src/ui/screen/screen_level_list.cpp +++ b/src/ui/screen/screen_level_list.cpp @@ -95,6 +95,7 @@ void CScreenLevelList::CreateInterface() if ( m_category == LevelCategory::Challenges ) res = RT_TITLE_DEFI; if ( m_category == LevelCategory::Missions ) res = RT_TITLE_MISSION; if ( m_category == LevelCategory::FreeGame ) res = RT_TITLE_FREE; + if ( m_category == LevelCategory::CodeBattles ) res = RT_TITLE_CODE_BATTLES; if ( m_category == LevelCategory::CustomLevels ) res = RT_TITLE_USER; GetResource(RES_TEXT, res, name); pw->SetName(name); @@ -115,11 +116,10 @@ void CScreenLevelList::CreateInterface() pos.y = oy+sy*10.5f; ddim.x = dim.x*7.5f; ddim.y = dim.y*0.6f; - if ( m_category == LevelCategory::Exercises ) res = RT_PLAY_CHAPt; - if ( m_category == LevelCategory::Challenges ) res = RT_PLAY_CHAPd; - if ( m_category == LevelCategory::Missions ) res = RT_PLAY_CHAPm; - if ( m_category == LevelCategory::FreeGame ) res = RT_PLAY_CHAPf; - if ( m_category == LevelCategory::CustomLevels ) res = RT_PLAY_CHAPu; + res = RT_PLAY_CHAP_CHAPTERS; + if ( m_category == LevelCategory::Missions ) res = RT_PLAY_CHAP_PLANETS; + if ( m_category == LevelCategory::FreeGame ) res = RT_PLAY_CHAP_PLANETS; + if ( m_category == LevelCategory::CustomLevels ) res = RT_PLAY_CHAP_USERLVL; GetResource(RES_TEXT, res, name); pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL11, name); pl->SetTextAlign(Gfx::TEXT_ALIGN_LEFT); @@ -141,11 +141,11 @@ void CScreenLevelList::CreateInterface() pos.y = oy+sy*10.5f; ddim.x = dim.x*7.5f; ddim.y = dim.y*0.6f; - if ( m_category == LevelCategory::Exercises ) res = RT_PLAY_LISTt; - if ( m_category == LevelCategory::Challenges ) res = RT_PLAY_LISTd; - if ( m_category == LevelCategory::Missions ) res = RT_PLAY_LISTm; - if ( m_category == LevelCategory::FreeGame ) res = RT_PLAY_LISTf; - if ( m_category == LevelCategory::CustomLevels ) res = RT_PLAY_LISTu; + res = RT_PLAY_LIST_LEVELS; + if ( m_category == LevelCategory::Exercises ) res = RT_PLAY_LIST_EXERCISES; + if ( m_category == LevelCategory::Challenges ) res = RT_PLAY_LIST_CHALLENGES; + if ( m_category == LevelCategory::Missions ) res = RT_PLAY_LIST_MISSIONS; + if ( m_category == LevelCategory::FreeGame ) res = RT_PLAY_LIST_FREEGAME; GetResource(RES_TEXT, res, name); pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL12, name); pl->SetTextAlign(Gfx::TEXT_ALIGN_LEFT); diff --git a/src/ui/screen/screen_main_menu.cpp b/src/ui/screen/screen_main_menu.cpp index a730610b..3c582fe2 100644 --- a/src/ui/screen/screen_main_menu.cpp +++ b/src/ui/screen/screen_main_menu.cpp @@ -57,7 +57,7 @@ void CScreenMainMenu::CreateInterface() ddim.y = 0.80f; pw = m_interface->CreateWindows(pos, ddim, 10, EVENT_WINDOW5); - GetResource(RES_TEXT, RT_TITLE_INIT, name); + GetResource(RES_TEXT, RT_TITLE_APPNAME, name); pw->SetName(name); pos.x = 0.35f; @@ -72,60 +72,51 @@ void CScreenMainMenu::CreateInterface() pw->CreateGroup(pos, ddim, 4, EVENT_INTERFACE_GLINTr); // blue corner ddim.x = 0.20f; - ddim.y = dim.y*2.4f; pos.x = 0.40f; - pos.y = oy+sy*9.1f; - pg = pw->CreateGroup(pos, ddim, 23, EVENT_LABEL1); // yellow + ddim.y = dim.y*2.0f; + pos.y = oy+sy*9.5f; + pg = pw->CreateGroup(pos, ddim, 23, EVENT_LABEL1); // missions + freegame pg->SetState(STATE_SHADOW); - pos.y = oy+sy*6.8f; - pg = pw->CreateGroup(pos, ddim, 24, EVENT_LABEL1); // orange + ddim.y = dim.y*2.95f; + pos.y = oy+sy*6.7f; + pg = pw->CreateGroup(pos, ddim, 24, EVENT_LABEL1); // exercises + challenges pg->SetState(STATE_SHADOW); - pos.y = oy+sy*3.9f; - pg = pw->CreateGroup(pos, ddim, 25, EVENT_LABEL1); // orange + ddim.y = dim.y*1.6f; + pos.y = oy+sy*3.4f; + pg = pw->CreateGroup(pos, ddim, 25, EVENT_LABEL1); // change player + settings pg->SetState(STATE_SHADOW); ddim.y = dim.y*1.2f; pos.y = oy+sy*1.9f; - pg = pw->CreateGroup(pos, ddim, 26, EVENT_LABEL1); // red + pg = pw->CreateGroup(pos, ddim, 26, EVENT_LABEL1); // quit pg->SetState(STATE_SHADOW); ddim.x = 0.18f; - ddim.y = dim.y*1; + ddim.y = dim.y*0.8f; pos.x = 0.41f; - pos.y = oy+sy*10.3f; + pos.y = oy+sy*10.5f; pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_MISSION); pb->SetState(STATE_SHADOW); - pos.y = oy+sy*9.2f; + pos.y = oy+sy*9.6f; pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_FREE); pb->SetState(STATE_SHADOW); - pos.y = oy+sy*8.0f; + pos.y = oy+sy*8.6f; pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_TRAINER); pb->SetState(STATE_SHADOW); - pos.y = oy+sy*6.9f; + pos.y = oy+sy*7.7f; pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_DEFI); pb->SetState(STATE_SHADOW); - pos.y = oy+sy*5.1f; - pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_SETUP); + pos.y = oy+sy*6.8f; + pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_CODE_BATTLES); pb->SetState(STATE_SHADOW); - pos.y = oy+sy*4.0f; - pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_NAME); - pb->SetState(STATE_SHADOW); - - pos.y = oy+sy*2.0f; - pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_QUIT); - pb->SetState(STATE_SHADOW); - - pos.x = 447.0f/640.0f; - pos.y = 313.0f/480.0f; - ddim.x = 0.09f; + pos.y = oy+sy*5.8f; pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_USER); pb->SetState(STATE_SHADOW); - try { CLevelParser levelParser("levels/custom/config.txt"); @@ -144,11 +135,20 @@ void CScreenMainMenu::CreateInterface() GetLogger()->Error("Failed loading userlevel button name: %s\n", e.what()); } - /*pos.x = 139.0f/640.0f; - pos.y = 313.0f/480.0f; - ddim.x = 0.09f; - pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_PROTO); - pb->SetState(STATE_SHADOW);*/ + ddim.y = dim.y*0.5f; + pos.y = oy+sy*4.35f; + pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_NAME); + pb->SetState(STATE_SHADOW); + + ddim.y = dim.y*0.75f; + pos.y = oy+sy*3.5f; + pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_SETUP); + pb->SetState(STATE_SHADOW); + + ddim.y = dim.y*1; + pos.y = oy+sy*2.0f; + pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_QUIT); + pb->SetState(STATE_SHADOW); pos.x = 0.40f; ddim.x = 0.20f; @@ -204,6 +204,11 @@ bool CScreenMainMenu::EventProcess(const Event &event) m_main->ChangePhase(PHASE_LEVEL_LIST); break; + case EVENT_INTERFACE_CODE_BATTLES: + m_main->SetLevel(LevelCategory::CodeBattles, 0, 0); + m_main->ChangePhase(PHASE_LEVEL_LIST); + break; + case EVENT_INTERFACE_USER: m_main->SetLevel(LevelCategory::CustomLevels, 0, 0); m_main->ChangePhase(PHASE_LEVEL_LIST);