Erwan
- Language is now an option at startup - "text" line translation for cards made easier, check Res/lang/xx_cards.txt - TODO: test on PSP/Linux, performance issues ? Allow possibility to change language in options menu
This commit is contained in:
@@ -23,6 +23,7 @@ public:
|
||||
enum {
|
||||
//Global settings
|
||||
ACTIVE_PROFILE,
|
||||
LANG,
|
||||
DIFFICULTY_MODE_UNLOCKED,
|
||||
MOMIR_MODE_UNLOCKED,
|
||||
EVILTWIN_MODE_UNLOCKED,
|
||||
|
||||
@@ -26,6 +26,7 @@ class GameStateMenu: public GameState, public JGuiListener
|
||||
//JMusic * bgMusic;
|
||||
int mVolume;
|
||||
char nbcardsStr[400];
|
||||
vector<string> langs;
|
||||
|
||||
DIR *mDip;
|
||||
struct dirent *mDit;
|
||||
@@ -38,6 +39,11 @@ class GameStateMenu: public GameState, public JGuiListener
|
||||
float angleW;
|
||||
float yW;
|
||||
void fillScroller();
|
||||
|
||||
void setLang(int id);
|
||||
string getLang(string s);
|
||||
void loadLangMenu();
|
||||
|
||||
public:
|
||||
GameStateMenu(GameApp* parent);
|
||||
virtual ~GameStateMenu();
|
||||
|
||||
@@ -14,8 +14,12 @@ using namespace std;
|
||||
class Translator{
|
||||
protected:
|
||||
static Translator * mInstance;
|
||||
bool initDone;
|
||||
|
||||
void load(string filename, map<string,string> * dictionary);
|
||||
public:
|
||||
map<string,string> values;
|
||||
map<string,string> tempValues;
|
||||
#if defined DEBUG_TRANSLATE
|
||||
map<string,int> missingValues;
|
||||
map<string,int> dontCareValues;
|
||||
@@ -25,6 +29,8 @@ public:
|
||||
Translator();
|
||||
~Translator();
|
||||
int Add(string from, string to);
|
||||
void initCards();
|
||||
void init();
|
||||
static Translator * GetInstance();
|
||||
static void EndInstance();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user