63 mThemeLabel(
new Label(this,
_(
"Gui theme"))),
67 mTheme(
config.getStringValue(
"theme")),
71 mFontLabel(
new Label(this,
_(
"Main Font"))),
74 mFont(
config.getStringValue(
"font")),
77 mLangLabel(
new Label(this,
_(
"Language"))),
80 mLang(
config.getStringValue(
"lang")),
82 mBoldFontLabel(
new Label(this,
_(
"Bold font"))),
85 mBoldFont(
config.getStringValue(
"boldFont")),
87 mParticleFontLabel(
new Label(this,
_(
"Particle font"))),
88 mParticleFontDropDown(
new DropDown(this, mFontsModel,
90 mParticleFont(
config.getStringValue(
"particleFont")),
92 mHelpFontLabel(
new Label(this,
_(
"Help font"))),
95 mHelpFont(
config.getStringValue(
"helpFont")),
97 mSecureFontLabel(
new Label(this,
_(
"Secure font"))),
100 mSecureFont(
config.getStringValue(
"secureFont")),
102 mNpcFontLabel(
new Label(this,
_(
"Npc font"))),
105 mNpcFont(
config.getStringValue(
"npcFont")),
107 mJapanFontLabel(
new Label(this,
_(
"Japanese font"))),
110 mJapanFont(
config.getStringValue(
"japanFont")),
112 mChinaFontLabel(
new Label(this,
_(
"Chinese font"))),
115 mChinaFont(
config.getStringValue(
"chinaFont")),
118 mFontSizeLabel(
new Label(this,
_(
"Font size"))),
119 mFontSize(
config.getIntValue(
"fontSize")),
120 mFontSizeDropDown(
new DropDown(this, mFontSizeListModel,
124 mNpcFontSizeLabel(
new Label(this,
_(
"Npc font size"))),
125 mNpcFontSize(
config.getIntValue(
"npcfontSize")),
126 mNpcFontSizeDropDown(
new DropDown(this, mNpcFontSizeListModel,
228 const int maxWidth =
mFontSize * 30 + 290;
231 else if (
size > maxWidth)
251 if (
mInfo !=
nullptr)
256 .append(
"\n").append(
_(
"Copyright:")).append(
"\n")
269 const std::string &eventId =
event.getId();
348 #define updateField(name1, name2) if (!mInfo->name1.empty()) \
359 _(
"Restart your client for the change to take effect."),
std::string getValue(const std::string &key, const std::string &deflt) const
std::string getStringValue(const std::string &key) const
void setValue(const std::string &key, const std::string &value)
int getIntValue(const std::string &key) const
std::string getSelectedString() const
void setSelected(int selected)
void setSelectedString(const std::string &str)
ContainerPlacer getPlacer(const int x, const int y)
void setName(const std::string &name)
Label * mParticleFontLabel
DropDown * mSecureFontDropDown
DropDown * mNpcFontDropDown
DropDown * mParticleFontDropDown
std::string mParticleFont
DropDown * mNpcFontSizeDropDown
ThemesModel * mThemesModel
DropDown * mThemeDropDown
DropDown * mFontSizeDropDown
DropDown * mChinaFontDropDown
LangListModel * mLangListModel
Setup_Theme(const Widget2 *const widget)
FontSizeChoiceListModel * mNpcFontSizeListModel
DropDown * mJapanFontDropDown
Label * mNpcFontSizeLabel
FontSizeChoiceListModel * mFontSizeListModel
DropDown * mBoldFontDropDown
void action(const ActionEvent &event)
DropDown * mHelpFontDropDown
static ThemeInfo * loadInfo(const std::string &themeName)
static std::string getThemeName()
const Language LANG_NAME[langs_count]
void loadInfo(const std::string &fileName, const SkipError skipError)
const char * ACTION_CHINA_FONT
const char * ACTION_HELP_FONT
const char * ACTION_PARTICLE_FONT
const char * ACTION_SECURE_FONT
const char * ACTION_BOLD_FONT
const char * ACTION_JAPAN_FONT
const char * ACTION_NPC_FONT
const char * ACTION_THEME
#define updateField(name1, name2)
const bool ShowCenter_true
std::string getFileName(const std::string &path)
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)