- hintbox: allow plain neutrino locales in bodytext

This commit is contained in:
svenhoefer
2014-12-22 09:15:26 +01:00
parent 1dc78e9584
commit 0f45e26728
2 changed files with 14 additions and 0 deletions

View File

@@ -42,11 +42,23 @@ CHintBox::CHintBox(const neutrino_locale_t Caption, const char * const Text, con
init(caption_tmp, Text, Width, Icon);
}
CHintBox::CHintBox(const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width, const char * const Icon)
{
const char * caption_tmp = g_Locale->getText(Caption);
const char * text_tmp = g_Locale->getText(Text);
init(caption_tmp, text_tmp, Width, Icon);
}
CHintBox::CHintBox(const char * const Caption, const char * const Text, const int Width, const char * const Icon)
{
init(Caption, Text, Width, Icon);
}
CHintBox::CHintBox(const char * const Caption, const neutrino_locale_t Text, const int Width, const char * const Icon)
{
const char * text_tmp = g_Locale->getText(Text);
init(Caption, text_tmp, Width, Icon);
}
void CHintBox::init(const char * const Caption, const char * const Text, const int Width, const char * const Icon)
{
char * begin;

View File

@@ -65,7 +65,9 @@ class CHintBox
public:
// Text is UTF-8 encoded
CHintBox(const neutrino_locale_t Caption, const char * const Text, const int Width = 450, const char * const Icon = NEUTRINO_ICON_INFO);
CHintBox(const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width = 450, const char * const Icon = NEUTRINO_ICON_INFO);
CHintBox(const char * const Caption, const char * const Text, const int Width = 450, const char * const Icon = NEUTRINO_ICON_INFO);
CHintBox(const char * const Caption, const neutrino_locale_t Text, const int Width = 450, const char * const Icon = NEUTRINO_ICON_INFO);
~CHintBox(void);
bool has_scrollbar(void);