Added "No userlevels installed" message

master
krzys-h 2015-08-06 19:37:18 +02:00
parent f95980456a
commit 8d34286b1d
11 changed files with 59 additions and 5 deletions

View File

@ -162,6 +162,12 @@ msgstr ""
msgid "OK" msgid "OK"
msgstr "" msgstr ""
msgid "No userlevels installed!"
msgstr ""
msgid "This menu is for userlevels from mods, but you didn't install any"
msgstr ""
msgid "Keyword help(\\key cbot;)" msgid "Keyword help(\\key cbot;)"
msgstr "" msgstr ""

View File

@ -937,6 +937,9 @@ msgstr "Kein konvertierbares Titanerz vorhanden"
msgid "No uranium to transform" msgid "No uranium to transform"
msgstr "Kein konvertierbares Platin" msgstr "Kein konvertierbares Platin"
msgid "No userlevels installed!"
msgstr ""
msgid "Normal size" msgid "Normal size"
msgstr "Normale Größe" msgstr "Normale Größe"
@ -1508,6 +1511,9 @@ msgstr "Dieses Element gibt es nicht in dieser Klasse"
msgid "This label does not exist" msgid "This label does not exist"
msgstr "Dieses Label existiert nicht" msgstr "Dieses Label existiert nicht"
msgid "This menu is for userlevels from mods, but you didn't install any"
msgstr ""
msgid "This object is not a member of a class" msgid "This object is not a member of a class"
msgstr "Das Objekt ist nicht eine Instanz einer Klasse" msgstr "Das Objekt ist nicht eine Instanz einer Klasse"

View File

@ -933,6 +933,9 @@ msgstr "Pas de titanium à transformer"
msgid "No uranium to transform" msgid "No uranium to transform"
msgstr "Pas d'uranium à transformer" msgstr "Pas d'uranium à transformer"
msgid "No userlevels installed!"
msgstr ""
msgid "Normal size" msgid "Normal size"
msgstr "Taille normale" msgstr "Taille normale"
@ -1503,6 +1506,9 @@ msgstr "Cet élément n'existe pas dans cette classe"
msgid "This label does not exist" msgid "This label does not exist"
msgstr "Cette étiquette n'existe pas" msgstr "Cette étiquette n'existe pas"
msgid "This menu is for userlevels from mods, but you didn't install any"
msgstr ""
msgid "This object is not a member of a class" msgid "This object is not a member of a class"
msgstr "L'objet n'est pas une instance d'une classe" msgstr "L'objet n'est pas une instance d'une classe"

View File

@ -938,6 +938,9 @@ msgstr "Brak tytanu do przetworzenia"
msgid "No uranium to transform" msgid "No uranium to transform"
msgstr "Brak uranu do przetworzenia" msgstr "Brak uranu do przetworzenia"
msgid "No userlevels installed!"
msgstr ""
msgid "Normal size" msgid "Normal size"
msgstr "Normalna wielkość" msgstr "Normalna wielkość"
@ -1505,6 +1508,9 @@ msgstr "To nie jest obiekt tej klasy"
msgid "This label does not exist" msgid "This label does not exist"
msgstr "Taka etykieta nie istnieje" msgstr "Taka etykieta nie istnieje"
msgid "This menu is for userlevels from mods, but you didn't install any"
msgstr ""
msgid "This object is not a member of a class" msgid "This object is not a member of a class"
msgstr "Ten obiekt nie jest członkiem klasy" msgstr "Ten obiekt nie jest członkiem klasy"

View File

@ -930,6 +930,9 @@ msgstr ""
msgid "No uranium to transform" msgid "No uranium to transform"
msgstr "Нет урана для преобразования" msgstr "Нет урана для преобразования"
msgid "No userlevels installed!"
msgstr ""
msgid "Normal size" msgid "Normal size"
msgstr "Нормальный размер" msgstr "Нормальный размер"
@ -1500,6 +1503,9 @@ msgstr "Это не член этого класса"
msgid "This label does not exist" msgid "This label does not exist"
msgstr "Эта метка не существует" msgstr "Эта метка не существует"
msgid "This menu is for userlevels from mods, but you didn't install any"
msgstr ""
msgid "This object is not a member of a class" msgid "This object is not a member of a class"
msgstr "Этот объект не член класса" msgstr "Этот объект не член класса"

View File

@ -111,6 +111,8 @@ void InitializeRestext()
stringsText[RT_DIALOG_NO] = TR("No"); stringsText[RT_DIALOG_NO] = TR("No");
stringsText[RT_DIALOG_LOADING] = TR("LOADING"); stringsText[RT_DIALOG_LOADING] = TR("LOADING");
stringsText[RT_DIALOG_OK] = TR("OK"); stringsText[RT_DIALOG_OK] = TR("OK");
stringsText[RT_DIALOG_NOUSRLVL_TITLE] = TR("No userlevels installed!");
stringsText[RT_DIALOG_NOUSRLVL_TEXT] = TR("This menu is for userlevels from mods, but you didn't install any");
stringsText[RT_STUDIO_LISTTT] = TR("Keyword help(\\key cbot;)"); stringsText[RT_STUDIO_LISTTT] = TR("Keyword help(\\key cbot;)");
stringsText[RT_STUDIO_COMPOK] = TR("Compilation ok (0 errors)"); stringsText[RT_STUDIO_COMPOK] = TR("Compilation ok (0 errors)");

View File

@ -107,6 +107,8 @@ enum ResTextType
RT_DIALOG_NO = 108, RT_DIALOG_NO = 108,
RT_DIALOG_LOADING = 109, RT_DIALOG_LOADING = 109,
RT_DIALOG_OK = 110, RT_DIALOG_OK = 110,
RT_DIALOG_NOUSRLVL_TITLE = 111,
RT_DIALOG_NOUSRLVL_TEXT = 112,
RT_STUDIO_LISTTT = 120, RT_STUDIO_LISTTT = 120,
RT_STUDIO_COMPOK = 121, RT_STUDIO_COMPOK = 121,

View File

@ -312,7 +312,9 @@ void CMainDialog::StartInformation(const std::string& title, const std::string&
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW9)); pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW9));
if ( pw == 0 ) return; if ( pw == 0 ) return;
pw->SetName(title);
if(!title.empty())
pw->SetName(title);
pos.x = 0.00f; pos.x = 0.00f;
pos.y = 0.50f; pos.y = 0.50f;

View File

@ -73,7 +73,7 @@ CMainUserInterface::CMainUserInterface()
m_dialog = MakeUnique<CMainDialog>(); m_dialog = MakeUnique<CMainDialog>();
m_screenAppearance = MakeUnique<CScreenApperance>(); m_screenAppearance = MakeUnique<CScreenApperance>();
m_screenLevelList = MakeUnique<CScreenLevelList>(); m_screenLevelList = MakeUnique<CScreenLevelList>(m_dialog.get());
m_screenIORead = MakeUnique<CScreenIORead>(m_screenLevelList.get()); m_screenIORead = MakeUnique<CScreenIORead>(m_screenLevelList.get());
m_screenIOWrite = MakeUnique<CScreenIOWrite>(m_screenLevelList.get()); m_screenIOWrite = MakeUnique<CScreenIOWrite>(m_screenLevelList.get());
m_screenLoading = MakeUnique<CScreenLoading>(); m_screenLoading = MakeUnique<CScreenLoading>();

View File

@ -29,6 +29,8 @@
#include "object/level/parser.h" #include "object/level/parser.h"
#include "ui/maindialog.h"
#include "ui/controls/button.h" #include "ui/controls/button.h"
#include "ui/controls/check.h" #include "ui/controls/check.h"
#include "ui/controls/edit.h" #include "ui/controls/edit.h"
@ -40,8 +42,9 @@
namespace Ui namespace Ui
{ {
CScreenLevelList::CScreenLevelList() CScreenLevelList::CScreenLevelList(CMainDialog* mainDialog)
: m_category{}, : m_dialog(mainDialog),
m_category{},
m_listCategory{}, m_listCategory{},
m_sceneSoluce{false}, m_sceneSoluce{false},
m_maxList{0}, m_maxList{0},
@ -232,6 +235,18 @@ void CScreenLevelList::CreateInterface()
pb->SetState(STATE_SHADOW); pb->SetState(STATE_SHADOW);
SetBackground("textures/interface/interface.png"); SetBackground("textures/interface/interface.png");
if (m_category == LevelCategory::CustomLevels)
{
if(m_customLevelList.size() == 0)
{
m_main->ChangePhase(PHASE_MAIN_MENU);
std::string title, text;
GetResource(RES_TEXT, RT_DIALOG_NOUSRLVL_TITLE, title);
GetResource(RES_TEXT, RT_DIALOG_NOUSRLVL_TEXT, text);
m_dialog->StartInformation(title, title, text);
}
}
} }
bool CScreenLevelList::EventProcess(const Event &event) bool CScreenLevelList::EventProcess(const Event &event)

View File

@ -28,11 +28,12 @@
namespace Ui namespace Ui
{ {
class CMainDialog;
class CScreenLevelList : public CScreen class CScreenLevelList : public CScreen
{ {
public: public:
CScreenLevelList(); CScreenLevelList(Ui::CMainDialog* mainDialog);
void SetLevelCategory(LevelCategory category); void SetLevelCategory(LevelCategory category);
@ -59,6 +60,8 @@ protected:
void UpdateSceneResume(int chap, int rank); void UpdateSceneResume(int chap, int rank);
protected: protected:
Ui::CMainDialog* m_dialog;
LevelCategory m_category; LevelCategory m_category;
LevelCategory m_listCategory; LevelCategory m_listCategory;