diff --git a/src/gui/buildinfo.cpp b/src/gui/buildinfo.cpp index 48abd219c..f89f933d3 100644 --- a/src/gui/buildinfo.cpp +++ b/src/gui/buildinfo.cpp @@ -174,7 +174,7 @@ void CBuildInfo::InitInfoItems() //init info texts for(size_t i=0; igetText(v_info[i].caption), v_info[i].info_text, ccw_body); + CComponentsExtTextForm *info = new CComponentsExtTextForm(10, CC_APPEND, w_info, h_info, g_Locale->getText(v_info[i].caption), v_info[i].info_text, NULL, ccw_body); info->setLabelAndTextFont(font); info->setTextModes(CTextBox::TOP , CTextBox::AUTO_HIGH | CTextBox::TOP | CTextBox::AUTO_LINEBREAK_NO_BREAKCHARS); info->doPaintBg(false); diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 97b798795..81354cc6c 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -36,18 +36,20 @@ using namespace std; CComponentsExtTextForm::CComponentsExtTextForm( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, fb_pixel_t text_color, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - initVarExtTextForm(x_pos, y_pos, w, h, label_text, text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow); + initVarExtTextForm(x_pos, y_pos, w, h, label_text, text, font_text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow); initCCTextItems(); } CComponentsExtTextFormLocalized::CComponentsExtTextFormLocalized(const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& locale_label_text, const neutrino_locale_t& locale_text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, @@ -55,12 +57,14 @@ CComponentsExtTextFormLocalized::CComponentsExtTextFormLocalized(const int& x_po fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) : CComponentsExtTextForm( x_pos, y_pos, w, h, g_Locale->getText(locale_label_text), g_Locale->getText(locale_text), + font_text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow){}; void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, @@ -92,7 +96,7 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p ccx_text_obj = NULL; corner_type = 0; int dx = 0, dy = DEF_HEIGHT; - ccx_font = *(CNeutrinoFonts::getInstance()->getDynFont(dx, dy)); + ccx_font = font_text == NULL ? *(CNeutrinoFonts::getInstance()->getDynFont(dx, dy)) : g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; ccx_label_align = ccx_text_align = CTextBox::NO_AUTO_LINEBREAK; initParent(parent); diff --git a/src/gui/components/cc_frm_ext_text.h b/src/gui/components/cc_frm_ext_text.h index 6bf1a23db..162ec34ad 100644 --- a/src/gui/components/cc_frm_ext_text.h +++ b/src/gui/components/cc_frm_ext_text.h @@ -68,6 +68,7 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen ///initialize basic variables void initVarExtTextForm(const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, @@ -78,6 +79,7 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen ///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as string CComponentsExtTextForm( const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48, const std::string& label_text = "", const std::string& text = "", + Font* font_text = NULL, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT, @@ -141,6 +143,7 @@ class CComponentsExtTextFormLocalized : public CComponentsExtTextForm ///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as locales CComponentsExtTextFormLocalized(const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48, const neutrino_locale_t& locale_label_text = NONEXISTANT_LOCALE, const neutrino_locale_t& locale_text = NONEXISTANT_LOCALE, + Font* font_text = NULL, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT,