diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 104ec4135..26880e6bd 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -327,7 +327,7 @@ int Font::getMaxDigitWidth(void) b[1] = 0; for (char c = '0'; c <= '9'; c++) { *b = c; - int w = getRenderWidth(b, true); + int w = getRenderWidth(b); if (w > maxdigitwidth) maxdigitwidth = w; } diff --git a/src/driver/lcdd.cpp b/src/driver/lcdd.cpp index 6730b59f0..23085ed50 100644 --- a/src/driver/lcdd.cpp +++ b/src/driver/lcdd.cpp @@ -409,7 +409,7 @@ static std::string splitString(const std::string & text, const int maxwidth, Lcd int pos; std::string tmp = removeLeadingSpaces(text); - if (font->getRenderWidth(tmp.c_str(), utf8) > maxwidth) + if (font->getRenderWidth(tmp, utf8) > maxwidth) { do { @@ -423,7 +423,7 @@ static std::string splitString(const std::string & text, const int maxwidth, Lcd else // does not fit -> fall back to dumb split tmp = tmp.substr(0, tmp.length()-1); } - } while (font->getRenderWidth(tmp.c_str(), utf8) > maxwidth); + } while (font->getRenderWidth(tmp, utf8) > maxwidth); } return tmp; @@ -510,7 +510,7 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co y += 14; if (centered) { - int w = fonts.channelname->getRenderWidth(cname[i].c_str(), big_utf8); + int w = fonts.channelname->getRenderWidth(cname[i], big_utf8); x = (LCD_COLS - w) / 2; } fonts.channelname->RenderString(x, y, LCD_COLS + 10, cname[i].c_str(), CLCDDisplay::PIXEL_ON, 0, big_utf8); @@ -527,7 +527,7 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co y += 10; if (centered) { - int w = fonts.menu->getRenderWidth(event[i].c_str(), small_utf8); + int w = fonts.menu->getRenderWidth(event[i], small_utf8); x = (LCD_COLS - w) / 2; } fonts.menu->RenderString(x, y, LCD_COLS + 10, event[i].c_str(), CLCDDisplay::PIXEL_ON, 0, small_utf8); @@ -1185,7 +1185,7 @@ void CLCD::showInfoBox(const char * const title, const char * const text ,int au // paint title if(!m_infoBoxTitle.empty()) { - int width = fonts.menu->getRenderWidth(m_infoBoxTitle.c_str(),true); + int width = fonts.menu->getRenderWidth(m_infoBoxTitle); if(width > LCD_COLS - 20) width = LCD_COLS - 20; int start_pos = (LCD_COLS - width) /2; @@ -1202,7 +1202,7 @@ void CLCD::showInfoBox(const char * const title, const char * const text ,int au { text_line.clear(); while ( m_infoBoxText[pos] != '\n' && - ((fonts.menu->getRenderWidth(text_line.c_str(), true) < EPG_INFO_TEXT_WIDTH-10) || !m_infoBoxAutoNewline )&& + ((fonts.menu->getRenderWidth(text_line) < EPG_INFO_TEXT_WIDTH-10) || !m_infoBoxAutoNewline )&& (pos < length)) // UTF-8 { if ( m_infoBoxText[pos] >= ' ' && m_infoBoxText[pos] <= '~' ) // any char between ASCII(32) and ASCII (126) @@ -1249,7 +1249,7 @@ void CLCD::showFilelist(int flist_pos,CFileList* flist,const char * const mainDi if(m_fileListPos > size) m_fileListPos = size-1; - int width = fonts.menu->getRenderWidth(m_fileListHeader.c_str(), true); + int width = fonts.menu->getRenderWidth(m_fileListHeader); if(width > LCD_COLS - 10) width = LCD_COLS - 10; fonts.menu->RenderString((LCD_COLS - width) / 2, 11, width+5, m_fileListHeader.c_str(), CLCDDisplay::PIXEL_ON); @@ -1351,7 +1351,7 @@ void CLCD::showProgressBar(int global, const char * const text,int show_escape,i display.draw_fill_rect (0, 12, LCD_COLS, 64, CLCDDisplay::PIXEL_OFF); // paint progress header - int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal.c_str(),true); + int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal); if(width > 100) width = 100; int start_pos = (LCD_COLS - width) /2; @@ -1421,7 +1421,7 @@ void CLCD::showProgressBar2(int local,const char * const text_local ,int global // paint global caption - int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal.c_str(),true); + int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal); if(width > 100) width = 100; int start_pos = (LCD_COLS - width) /2; @@ -1435,7 +1435,7 @@ void CLCD::showProgressBar2(int local,const char * const text_local ,int global // paint local caption - width = fonts.menu->getRenderWidth(m_progressHeaderLocal.c_str(),true); + width = fonts.menu->getRenderWidth(m_progressHeaderLocal); if(width > 100) width = 100; start_pos = (LCD_COLS - width) /2; diff --git a/src/driver/neutrinofonts.cpp b/src/driver/neutrinofonts.cpp index 908c2ec1d..40cc0f88a 100644 --- a/src/driver/neutrinofonts.cpp +++ b/src/driver/neutrinofonts.cpp @@ -239,7 +239,7 @@ int CNeutrinoFonts::getDynFontSize(int dx, int dy, std::string text, int style) std::string tmpText = text; if (text == "") tmpText = "x"; - _width = dynFont->getRenderWidth(tmpText.c_str()); + _width = dynFont->getRenderWidth(tmpText); if ((_height > dy) || (_width > dx)) { if (dynFlag) dynSize--; @@ -314,7 +314,7 @@ Font **CNeutrinoFonts::getDynFontWithID(int &dx, int &dy, std::string text, int if ((v_dyn_fonts[f_id].size == dynSize) && (v_dyn_fonts[f_id].font != NULL)) { dy = v_dyn_fonts[f_id].font->getHeight(); if (text != "") - dx = v_dyn_fonts[f_id].font->getRenderWidth(text.c_str()); + dx = v_dyn_fonts[f_id].font->getRenderWidth(text); return &(v_dyn_fonts[f_id].font); } @@ -335,7 +335,7 @@ Font **CNeutrinoFonts::getDynFontWithID(int &dx, int &dy, std::string text, int dy = (*ret)->getHeight(); if (text != "") - dx = (*ret)->getRenderWidth(text.c_str()); + dx = (*ret)->getRenderWidth(text); #ifdef DEBUG_NFONTS printf("##### [%s] dx: %d, dy: %d, dynSize: %d, dynFont: %p, ret: %p, FontID: %d\n", __FUNCTION__, dx, dy, dynSize, *ret, ret, f_id); #endif @@ -389,7 +389,7 @@ Font **CNeutrinoFonts::getDynFontShare(int &dx, int &dy, std::string text, int s dy = (*ret)->getHeight(); if (text != "") - dx = (*ret)->getRenderWidth(text.c_str()); + dx = (*ret)->getRenderWidth(text); #ifdef DEBUG_NFONTS printf("##### [%s] dx: %d, dy: %d, dynSize: %d, dynFont: %p, ret: %p, fontAvailable: %d\n", __FUNCTION__, dx, dy, dynSize, *ret, ret, fontAvailable); #endif diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index 8072f0bf3..b0bcd6d58 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -768,7 +768,7 @@ void CVFD::showInfoBox(const char * const title, const char * const text ,int au // paint title if(!m_infoBoxTitle.empty()) { - int width = fonts.menu->getRenderWidth(m_infoBoxTitle.c_str(),true); + int width = fonts.menu->getRenderWidth(m_infoBoxTitle); if(width > 100) width = 100; int start_pos = (120-width) /2; @@ -785,7 +785,7 @@ void CVFD::showInfoBox(const char * const title, const char * const text ,int au { text_line.clear(); while ( m_infoBoxText[pos] != '\n' && - ((fonts.menu->getRenderWidth(text_line.c_str(), true) < EPG_INFO_TEXT_WIDTH-10) || !m_infoBoxAutoNewline )&& + ((fonts.menu->getRenderWidth(text_line) < EPG_INFO_TEXT_WIDTH-10) || !m_infoBoxAutoNewline )&& (pos < length)) // UTF-8 { if ( m_infoBoxText[pos] >= ' ' && m_infoBoxText[pos] <= '~' ) // any char between ASCII(32) and ASCII (126) @@ -835,7 +835,7 @@ void CVFD::showFilelist(int flist_pos,CFileList* flist,const char * const mainDi if(m_fileListPos > size) m_fileListPos = size-1; - int width = fonts.menu->getRenderWidth(m_fileListHeader.c_str(), true); + int width = fonts.menu->getRenderWidth(m_fileListHeader); if(width>110) width=110; fonts.menu->RenderString((120-width)/2, 11, width+5, m_fileListHeader.c_str(), CLCDDisplay::PIXEL_ON); @@ -940,7 +940,7 @@ void CVFD::showProgressBar(int global, const char * const text,int show_escape,i display.draw_fill_rect (0,12,120,64, CLCDDisplay::PIXEL_OFF); // paint progress header - int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal.c_str(),true); + int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal); if(width > 100) width = 100; int start_pos = (120-width) /2; @@ -1011,7 +1011,7 @@ void CVFD::showProgressBar2(int local,const char * const text_local ,int global display.draw_fill_rect (0,12,120,64, CLCDDisplay::PIXEL_OFF); // paint global header - int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal.c_str(),true); + int width = fonts.menu->getRenderWidth(m_progressHeaderGlobal); if(width > 100) width = 100; int start_pos = (120-width) /2; @@ -1024,7 +1024,7 @@ void CVFD::showProgressBar2(int local,const char * const text_local ,int global display.draw_fill_rect (PROG2_GLOB_POS_X+1+marker_length, PROG2_GLOB_POS_Y+1, PROG2_GLOB_POS_X+PROG2_GLOB_POS_WIDTH-1, PROG2_GLOB_POS_Y+PROG2_GLOB_POS_HEIGTH-1, CLCDDisplay::PIXEL_OFF); // paint local header - width = fonts.menu->getRenderWidth(m_progressHeaderLocal.c_str(),true); + width = fonts.menu->getRenderWidth(m_progressHeaderLocal); if(width > 100) width = 100; start_pos = (120-width) /2; diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 6d6f62a61..3b37773aa 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1753,7 +1753,7 @@ void CAudioPlayerGui::paintInfo() tmp += sNr ; } - int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); int xstart = (m_width - w) / 2; if (xstart < 10) xstart = 10; @@ -1779,7 +1779,7 @@ void CAudioPlayerGui::paintInfo() tmp += " / "; tmp += m_curr_audiofile.MetaData.title; } - w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); xstart=(m_width-w)/2; if (xstart < 10) xstart=10; @@ -1872,7 +1872,7 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) tmp += " / "; tmp += m_playlist[m_selected].MetaData.date; } - int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true) + 10; // UTF-8 + int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp) + 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + m_width - w - 5, ypos2 + 2 + 1*m_fheight, w, tmp, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 tmp = m_playlist[m_selected].MetaData.artist; diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 5a0365de5..af02b9560 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -370,7 +370,7 @@ int CBouquetList::show(bool bShowChannelList) favonly = !bShowChannelList; for(unsigned int count = 0; count < sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]);count++){ - int w_text = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText (CBouquetListButtons[count].locale),true); + int w_text = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(CBouquetListButtons[count].locale)); w_max_text = std::max(w_max_text, w_text); frameBuffer->getIconSize(CBouquetListButtons[count].button, &icol_w, &icol_h); w_max_icon = std::max(w_max_icon, icol_w); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index d8fd53e1a..fb997ae7a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1648,14 +1648,14 @@ void CChannelList::paintDetails(int index) noch= 0; snprintf(cNoch, sizeof(cNoch), "(%u / %d %s)", seit, noch, unit_short_minute); } - int seit_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cSeit, true); // UTF-8 - int noch_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cNoch, true); // UTF-8 + int seit_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cSeit); + int noch_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cNoch); std::string text1= p_event->description; std::string text2= p_event->text; int xstart = 10; - if (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1, true) > (full_width - 30 - seit_len) ) + if (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1) > (full_width - 30 - seit_len) ) { // zu breit, Umbruch versuchen... int pos; @@ -1663,7 +1663,7 @@ void CChannelList::paintDetails(int index) pos = text1.find_last_of("[ -.]+"); if ( pos!=-1 ) text1 = text1.substr( 0, pos ); - } while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1, true) > (full_width - 30 - seit_len) ) ); + } while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1) > (full_width - 30 - seit_len) ) ); std::string text3 = ""; /* not perfect, but better than crashing... */ if (p_event->description.length() > text1.length()) @@ -1672,7 +1672,7 @@ void CChannelList::paintDetails(int index) if (!text2.empty() && !text3.empty()) text3= text3+ " - "; - xstart += g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text3, true); + xstart += g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text3); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2* fheight, full_width - 30- noch_len, text3, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); } @@ -1682,7 +1682,7 @@ void CChannelList::paintDetails(int index) text2 = text2.substr( 0, text2.find('\n') ); #if 0 //FIXME: to discuss, eat too much cpu time if string long enough int pos = 0; - while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text2, true) > (full_width - 30 - noch_len) ) ) { + while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text2) > (full_width - 30 - noch_len) ) ) { pos = text2.find_last_of(" "); if ( pos!=-1 ) { @@ -1719,7 +1719,7 @@ void CChannelList::paintDetails(int index) struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit); snprintf(cFrom, sizeof(cFrom), "%s %02d:%02d",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min ); snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str()); - int from_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cFrom, true); // UTF-8 + int from_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cFrom); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight+ fdescrheight, full_width - 30 - from_len, buf, colored_event_N ? COL_COLORED_EVENTS_TEXT :COL_MENUCONTENTDARK_TEXT, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- from_len, y+ height+ 5+ 2*fheight+ fdescrheight, from_len, cFrom, colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 @@ -2036,8 +2036,8 @@ void CChannelList::paintItem(int pos, const bool firstpaint) int pb_max = pb_space - 4; if (!(p_event->description.empty())) { snprintf(nameAndDescription+l, sizeof(nameAndDescription)-l,g_settings.channellist_epgtext_align_right ? " ":" - "); - unsigned int ch_name_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(nameAndDescription, true); - unsigned int ch_desc_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(p_event->description, true); + unsigned int ch_name_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(nameAndDescription); + unsigned int ch_desc_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(p_event->description); int max_desc_len = width - numwidth - prg_offset - ch_name_len - 15 - 20; // 15 = scrollbar, 20 = spaces if (chan->scrambled || (g_settings.channellist_extended ||g_settings.channellist_epgtext_align_right)) @@ -2149,7 +2149,7 @@ void CChannelList::paintHead() void CChannelList::paint() { - numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(MaxChanNr().c_str()); + numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(MaxChanNr()); liststart = (selected/listmaxshow)*listmaxshow; updateEvents(this->historyMode ? 0:liststart, this->historyMode ? 0:(liststart + listmaxshow)); @@ -2409,7 +2409,7 @@ void CChannelList::processTextToArray(std::string text, int screening) // UTF-8 if (*text_!='\n') aktWord += *text_; - int aktWordWidth = g_Font[eventFont]->getRenderWidth(aktWord, true); + int aktWordWidth = g_Font[eventFont]->getRenderWidth(aktWord); if ((aktWordWidth+aktWidth)<(infozone_width - 20)) {//space ok, add aktWidth += aktWordWidth; diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index e458514e8..6a023bacb 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -204,7 +204,7 @@ void CComponentsButton::initCaption() //handle common position of icon and text inside container required for alignment int w_required = fr_thickness + append_x_offset; w_required += cc_btn_icon_obj ? cc_btn_icon_obj->getWidth() + append_x_offset : 0; - w_required += cc_btn_font ? cc_btn_font->getRenderWidth(cc_btn_capt, true) : 0; + w_required += cc_btn_font ? cc_btn_font->getRenderWidth(cc_btn_capt) : 0; w_required += append_x_offset + fr_thickness; //dynamic width diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 12dfbaeb1..cc01ee1c1 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -117,7 +117,7 @@ void CComponentsFrmClock::initCCLockItems() string s_time = cl_timestr; //get minimal required height, width from raw text - int min_text_w = (*getClockFont())->getRenderWidth(s_time, true);; + int min_text_w = (*getClockFont())->getRenderWidth(s_time); int min_text_h = (*getClockFont())->getHeight(); height = max(height, min_text_h); width = max(width, min_text_w); @@ -153,7 +153,7 @@ void CComponentsFrmClock::initCCLockItems() int minSepWidth = 0; string sep[] ={" ", ".", ":"}; for (size_t i = 0; i < sizeof(sep)/sizeof(sep[0]); i++) - minSepWidth = max((*getClockFont())->getRenderWidth(sep[i], true), minSepWidth); + minSepWidth = max((*getClockFont())->getRenderWidth(sep[i]), minSepWidth); //modify available label items with current segment chars for (size_t i = 0; i < v_cc_items.size(); i++) @@ -179,7 +179,7 @@ void CComponentsFrmClock::initCCLockItems() if (isdigit(stmp.at(0)) ) //check for digits, if true, we use digit width wtmp = (*getClockFont())->getMaxDigitWidth(); else //not digit found, we use render width or minimal width - wtmp = max((*getClockFont())->getRenderWidth(stmp, true), minSepWidth); + wtmp = max((*getClockFont())->getRenderWidth(stmp), minSepWidth); //set size, text, color of current item lbl->setDimensionsAll(cl_x, cl_y, wtmp, cl_h); diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 6bdbbd4ca..70ff43ce2 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -69,9 +69,9 @@ CDBoxInfoWidget::CDBoxInfoWidget() fontWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth(); sizeWidth = 6 * g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getMaxDigitWidth() - + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(std::string(" MiB") + g_Locale->getText(LOCALE_UNIT_DECIMAL), true); ;//9999.99 MiB + + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(std::string(" MiB") + g_Locale->getText(LOCALE_UNIT_DECIMAL)); ;//9999.99 MiB percWidth = 3 * g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getMaxDigitWidth() - + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("%", true); //100% + + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("%"); //100% nameWidth = fontWidth * 10; } @@ -280,7 +280,7 @@ void CDBoxInfoWidget::paint() mounts[mountpoint] = is_rec; int icon_space = is_rec ? 10 + icon_w : 0; const char *mnt = mountpoint.c_str(); - nameWidth = std::max(nameWidth, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(basename((char *)mnt), true) + icon_space + 10); + nameWidth = std::max(nameWidth, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(basename((char *)mnt)) + icon_space + 10); } } in.close(); @@ -341,7 +341,7 @@ void CDBoxInfoWidget::paint() int head_info_rw = 0; for (int line = 0; line < head_info_lines; line++) { - head_info_rw = std::max(head_info_rw, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(head_info[line], true)); + head_info_rw = std::max(head_info_rw, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(head_info[line])); } int dw = offsetw - 3*10 - head_info_rw; @@ -467,7 +467,7 @@ void CDBoxInfoWidget::paint() } mpOffset = offsets[column]; int space = 0; - int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); + int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); if (column > 0) { space = widths[column] - rw; } @@ -491,7 +491,7 @@ void CDBoxInfoWidget::paint() int ypos_mnt_head = ypos; ypos += mheight; - int width_i = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("i", true); + int width_i = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("i"); CRecordManager * crm = CRecordManager::getInstance(); for (std::map::iterator it = mounts.begin(); it != mounts.end(); ++it) { @@ -535,7 +535,7 @@ void CDBoxInfoWidget::paint() } int space = 0; if (column > 0) { - int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); + int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); maxWidth[column] = std::max(maxWidth[column], rw); space = widths[column] - rw; _w = rw; @@ -570,7 +570,7 @@ void CDBoxInfoWidget::paint() for (int column = 0; column < headSize; column++) { headOffset = offsets[column]; int space = 0; - int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(head_mem[column], true); + int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(head_mem[column]); int _w = rw; if (column > 0) { if (rw > maxWidth[column]) @@ -585,7 +585,7 @@ void CDBoxInfoWidget::paint() for (int column = 0; column < headSize; column++) { headOffset = offsets[column]; int space = 0; - int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(head_mnt[column], true); + int rw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(head_mnt[column]); int _w = rw; if (column > 0) { if (rw > maxWidth[column]) diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index dfeaf45d4..04ca01923 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -186,13 +186,13 @@ void EpgPlus::TimeLine::paint (time_t startTime, int pduration) std::string timeStr = EpgPlus::getTimeString (tickTime, "%H"); - int textWidth = this->fontTime->getRenderWidth (timeStr, true); + int textWidth = this->fontTime->getRenderWidth (timeStr); this->fontTime->RenderString (xPos - textWidth - 4, this->y + this->fontTime->getHeight() , textWidth, timeStr, toggleColor ? COL_MENUCONTENT_P1 : COL_MENUCONTENT_P2, 0, true); // UTF-8 timeStr = EpgPlus::getTimeString (tickTime, "%M"); - textWidth = this->fontTime->getRenderWidth (timeStr, true); + textWidth = this->fontTime->getRenderWidth (timeStr); this->fontTime->RenderString (xPos + 4, this->y + this->fontTime->getHeight() , textWidth, timeStr, toggleColor ? COL_MENUCONTENT_P1 : COL_MENUCONTENT_P2, 0, true); // UTF-8 @@ -223,14 +223,14 @@ void EpgPlus::TimeLine::paintMark (time_t startTime, int pduration, int px, int // display start time before mark std::string timeStr = EpgPlus::getTimeString (startTime, "%H:%M"); - int textWidth = this->fontTime->getRenderWidth (timeStr, true); + int textWidth = this->fontTime->getRenderWidth (timeStr); this->fontTime->RenderString (px - textWidth, this->y + this->fontTime->getHeight() + this->fontTime->getHeight() , textWidth, timeStr, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 // display end time after mark timeStr = EpgPlus::getTimeString (startTime + pduration, "%H:%M"); - textWidth = fontTime->getRenderWidth (timeStr, true); + textWidth = fontTime->getRenderWidth (timeStr); if (px + pwidth + textWidth < this->x + this->width) { this->fontTime->RenderString (px + pwidth, this->y + this->fontTime->getHeight() + this->fontTime->getHeight() diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 0a44b8224..6f0861e67 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -179,7 +179,7 @@ void CEpgData::processTextToArray(std::string text, int screening) // UTF-8 aktWord += *text_; // check the wordwidth - add to this line if size ok - int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord, true); + int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord); if ((aktWordWidth+aktWidth)<(ox - 20 - 15)) {//space ok, add aktWidth += aktWordWidth; @@ -228,10 +228,10 @@ void CEpgData::showText( int startPos, int ypos ) int max_mon_w = 0, max_wday_w = 0; int digi = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth("29.."); for(int i = 0; i < 12;i++){ - max_mon_w = std::max(max_mon_w, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getMonth(i))) + " ", true)); // UTF-8 + max_mon_w = std::max(max_mon_w, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getMonth(i))) + " ")); if(i > 6) continue; - max_wday_w = std::max(max_wday_w, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getWeekday(i))) + " ", true)); // UTF-8 + max_wday_w = std::max(max_wday_w, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getWeekday(i))) + " ")); } frameBuffer->paintBoxRel(sx, y, ox- 15, sb, COL_MENUCONTENT_PLUS_0); // background of the text box for (int i = startPos; i < textSize && i < startPos + medlinecount; i++, y += medlineheight) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index dc8518f90..21f9b1b58 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -765,7 +765,7 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI) } // 1st line - int fwidth1a=g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth(datetime1_str,true); + int fwidth1a=g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth(datetime1_str); g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5, ypos+ fheight1+3, fwidth1a, datetime1_str, color, 0, true); // UTF-8 @@ -774,7 +774,7 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI) { char beginnt[100]; snprintf(beginnt, sizeof(beginnt), "%s %d %s", g_Locale->getText(LOCALE_WORD_IN), seit, unit_short_minute); - int w = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(beginnt, true) + 10; + int w = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(beginnt) + 10; g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20- w, ypos+ fheight1+3, w, beginnt, color, 0, true); // UTF-8 } g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20, ypos+ fheight1+3, fwidth2, duration_str, color, 0, true); // UTF-8 @@ -852,9 +852,9 @@ void CNeutrinoEventList::paintHead(std::string _channelname, std::string _channe const short font_h = 8 /* FONT_TYPE_EVENTLIST_ITEMLARGE */; short pn_y_off = std::max((theight - g_Font[font_h]->getHeight()) / 2, 0); - short prev_len = g_Font[font_h]->getRenderWidth(_channelname_prev.c_str(),true); - short next_len = g_Font[font_h]->getRenderWidth(_channelname_next.c_str(),true); - short middle_len = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getRenderWidth(_channelname.c_str(),true); + short prev_len = g_Font[font_h]->getRenderWidth(_channelname_prev); + short next_len = g_Font[font_h]->getRenderWidth(_channelname_next); + short middle_len = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getRenderWidth(_channelname); short middle_offset = (full_width- next_len- prev_len- middle_len)/2; if(middle_offset < 0){ int fw_h = g_Font[font_h]->getWidth(); diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 88ef0831b..4ef5b2be3 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1438,7 +1438,7 @@ void CFileBrowser::paintSMSKey() { char cKey[2]={m_SMSKeyInput.getOldKey(),0}; cKey[0] = toupper(cKey[0]); - int len = fnt_small->getRenderWidth(cKey, true); + int len = fnt_small->getRenderWidth(cKey); fnt_small->RenderString(x + width - skwidth, y + height - foheight + (skheight/2), len, cKey, COL_MENUHEAD_TEXT, 0, true); } } diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 7d9f741d1..05dc0f640 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -773,7 +773,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con std::string prov_name = pname; prov_name=prov_name.substr(prov_name.find_first_of("]")+1); - int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName, true);// UTF-8 + int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName); unsigned int chann_size = ChannelName.size(); if(ChannelName.empty()) chann_size = 1; @@ -1017,7 +1017,7 @@ void CInfoViewer::showSubchan () int dy = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); // 25; if (g_RemoteControl->director_mode) { - int w = 20 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth (g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), true) + 20; // UTF-8 + int w = 20 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth (g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE)) + 20; int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); if (w > dx) dx = w; @@ -1103,7 +1103,7 @@ void CInfoViewer::showMotorMoving (int duration) char text[256]; snprintf(text, sizeof(text), "%s (%ds)", g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING), duration); - ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8 + ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text) + 10, duration); // UTF-8 } void CInfoViewer::killRadiotext() diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 7af745301..6afbe45c4 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -608,7 +608,7 @@ int CLuaInstance::RenderString(lua_State *L) center = luaL_checkint(L, 9); if (f >= SNeutrinoSettings::FONT_TYPE_COUNT || f < 0) f = SNeutrinoSettings::FONT_TYPE_MENU; - int rwidth = g_Font[f]->getRenderWidth(text, true); + int rwidth = g_Font[f]->getRenderWidth(text); if (center) { /* center the text inside the box */ if (rwidth < w) x += (w - rwidth) / 2; @@ -635,7 +635,7 @@ int CLuaInstance::getRenderWidth(lua_State *L) if (f >= SNeutrinoSettings::FONT_TYPE_COUNT || f < 0) f = SNeutrinoSettings::FONT_TYPE_MENU; - lua_pushinteger(L, (int)g_Font[f]->getRenderWidth(text, true)); + lua_pushinteger(L, (int)g_Font[f]->getRenderWidth(text)); return 1; } diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 0256f9573..218d7ad45 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1606,7 +1606,7 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data) int x[subtext.size()]; int y[subtext.size()]; for (unsigned i = 0; i < subtext.size(); i++) { - int w = g_Font[SNeutrinoSettings::FONT_TYPE_SUBTITLES]->getRenderWidth (subtext[i].c_str(), true); + int w = g_Font[SNeutrinoSettings::FONT_TYPE_SUBTITLES]->getRenderWidth (subtext[i]); x[i] = (sw - w) / 2; y[i] = sh - height + h*(i + 1); min_x = std::min(min_x, x[i]); diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 0dc6f6595..bc38a2763 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -412,7 +412,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY: freqready = 1; sprintf(buffer, "%u", data); - xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true)+2; + xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer)+2; paintLine(xpos2, ypos_frequency, xpos_frequency, buffer); paintRadar(); break; @@ -533,12 +533,12 @@ void CScanTs::paint(bool fortest) if(deltype == FE_QPSK) { //sat paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_ACTSATELLITE); - xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE), true)+2; // UTF-8 + xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE))+2; } if(deltype == FE_QAM) { //cable paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_ACTCABLE); - xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTCABLE), true)+2; // UTF-8 + xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTCABLE))+2; } ypos_transponder = ypos; @@ -569,7 +569,7 @@ void CScanTs::paint(bool fortest) int CScanTs::greater_xpos(int xpos, const neutrino_locale_t txt) { - int txt_xpos = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(txt), true)+2; // UTF-8 + int txt_xpos = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(txt))+2; if (txt_xpos > xpos) return txt_xpos; else diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index cafb07d9b..ed59b5ef5 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -369,7 +369,7 @@ unsigned int CScanSetup::getSatMenuListWidth() satellite_map_t satmap = CServiceManager::getInstance()->SatelliteList(); for(sat_iterator_t it = satmap.begin(); it != satmap.end(); ++it) { - sat_txt_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(it->second.name.c_str(), true); + sat_txt_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(it->second.name); max_txt_w = std::max(max_txt_w, sat_txt_w); } diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index c8a80e5e4..d39cc67ec 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -449,12 +449,12 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) transponder t; CServiceManager::getInstance()->GetTransponder(channel->getTransponderId(), t); - int array[6]={g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION),true), - g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_ARATIO),true), - g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_BITRATE),true), - g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_FRAMERATE),true), - g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE),true), - g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_SCANTS_FREQDATA),true)};// UTF-8 + int array[6]={g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION)), + g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_ARATIO)), + g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_BITRATE)), + g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_FRAMERATE)), + g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE)), + g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_SCANTS_FREQDATA))}; for(i=0 ; i<6; i++) { if(spaceoffset < array[i]) @@ -685,7 +685,7 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos) return; for(i = 0; i < NUM_CAIDS; i++) { - array[i] = g_Font[font_info]->getRenderWidth(casys[i].c_str()); + array[i] = g_Font[font_info]->getRenderWidth(casys[i]); caids[i] = false; } @@ -759,7 +759,7 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos) if(index == 0) width_txt = spaceoffset; else - width_txt += g_Font[font_small]->getRenderWidth(casys[ca_id].substr(last_pos, pos - last_pos).c_str())+10; + width_txt += g_Font[font_small]->getRenderWidth(casys[ca_id].substr(last_pos, pos - last_pos))+10; index++; if (index > 5) break; diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 6b0189494..6353e9c5d 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -895,7 +895,7 @@ void CUpnpBrowserGui::paintDeviceInfo() // first line tmp = m_devices[m_selecteddevice].manufacturer + " " + m_devices[m_selecteddevice].manufacturerurl; - w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); w = std::min(w, m_width - 20); xstart = (m_width - w) / 2; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 1*m_mheight, m_width - 20, @@ -905,14 +905,14 @@ void CUpnpBrowserGui::paintDeviceInfo() tmp = m_devices[m_selecteddevice].modelname + " " + m_devices[m_selecteddevice].modelnumber + " " + m_devices[m_selecteddevice].modeldescription; - w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); w = std::min(w, m_width - 20); xstart = (m_width - w) / 2; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 2*m_mheight, m_width - 20, tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // third line tmp = m_devices[m_selecteddevice].modelurl; - w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); w = std::min(w, m_width - 20); xstart = (m_width - w) / 2; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 3*m_mheight, m_width - 20, @@ -1081,7 +1081,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) else tmp = tmp + "No resource for Item"; - w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); w = std::min(w, m_width - 20); xstart = (m_width - w) / 2; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 1*m_mheight, m_width - 20, @@ -1096,7 +1096,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) if (preferred != -1) tmp = "Protocol: " + entry->proto + ", MIME-Type: " + entry->mime; } - w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); w = std::min(w, m_width - 20); xstart = (m_width - w) / 2; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 2*m_mheight, m_width - 20, @@ -1107,7 +1107,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) if (!entry->isdir && preferred != -1) tmp = "URL: " + entry->resources[preferred].url; - w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 + w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); w = std::min(w, m_width - 20); xstart = (m_width - w) / 2; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 3*m_mheight, m_width - 20, diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index 0d52a4406..fad576a52 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -140,9 +140,9 @@ int paintButtons( const int &x, buttontext[i] = g_Locale->getText(content[i].locale); //text width if (alt_buttontext != NULL && i == buttontext_id) - fwidth[i] = font->getRenderWidth(alt_buttontext, true); //...with an alternate buttontext + fwidth[i] = font->getRenderWidth(alt_buttontext); //...with an alternate buttontext else - fwidth[i] = font->getRenderWidth(buttontext[i], true); + fwidth[i] = font->getRenderWidth(buttontext[i]); w_text += fwidth[i]; count_labels++; } else { diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index 758cce4a7..602a7400b 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -79,7 +79,7 @@ CColorChooser::CColorChooser(const neutrino_locale_t Name, unsigned char *R, uns //calculate max width of LOCALS offset = 0; for (int i = 0; i < 4; i++) { - int tmpoffset = g_Font[font_info]->getRenderWidth(g_Locale->getText (colorchooser_names[i])); + int tmpoffset = g_Font[font_info]->getRenderWidth(g_Locale->getText(colorchooser_names[i])); if (tmpoffset > offset) { offset = tmpoffset; } diff --git a/src/gui/widget/drawable.cpp b/src/gui/widget/drawable.cpp index 7435d9158..d83c7882b 100644 --- a/src/gui/widget/drawable.cpp +++ b/src/gui/widget/drawable.cpp @@ -80,7 +80,7 @@ DText::DText(const char *text) void DText::init() { - m_width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(m_text, true); // UTF-8 + m_width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(m_text); m_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); } diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 314b0519a..4fb237fab 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -106,15 +106,14 @@ void CHintBox::init(const char * const Caption, const char * const Text, const i else iconfile = ""; - //nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(caption), true); // UTF-8 - nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(caption, true); // UTF-8 + nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(caption); if (nw > width) width = nw; for (std::vector::const_iterator it = line.begin(); it != line.end(); ++it) { - int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(*it, true); // UTF-8 + int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(*it); maxLineWidth = std::max(maxLineWidth, w); nw = additional_width + w; if (nw > width) diff --git a/src/gui/widget/hintboxext.cpp b/src/gui/widget/hintboxext.cpp index 4ac14c74c..1a7c90f4a 100644 --- a/src/gui/widget/hintboxext.cpp +++ b/src/gui/widget/hintboxext.cpp @@ -224,7 +224,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const std::string &Capti m_iconfile = ""; const char *l_caption = (m_caption == NONEXISTANT_LOCALE) ? m_captionString.c_str() : g_Locale->getText(m_caption); - nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(l_caption, true); // UTF-8 + nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(l_caption); if (nw > m_width) m_width = nw; diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index f11a0d28b..50abbb697 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -157,11 +157,11 @@ void CKeyChooserItem::paint() CFrameBuffer * frameBuffer = CFrameBuffer::getInstance(); int tmp; - width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name), true); - tmp = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_KEYCHOOSER_TEXT1), true); + width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name)); + tmp = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_KEYCHOOSER_TEXT1)); if (tmp > width) width = tmp; - tmp = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_KEYCHOOSER_TEXT2), true); + tmp = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_KEYCHOOSER_TEXT2)); if (tmp > width) width = tmp; width += 20; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index fea30fe37..cd7e778c2 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -166,8 +166,8 @@ void CMenuItem::paintItemCaption(const bool select_mode, const int &item_height, //right text if (right_text && (*right_text || right_bgcol)) { - int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(right_text, true); - int stringstartposOption = std::max(name_start_x + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(left_text, true) + icon_frame_w, x + dx - stringwidth - icon_frame_w); //+ offx + int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(right_text); + int stringstartposOption = std::max(name_start_x + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(left_text) + icon_frame_w, x + dx - stringwidth - icon_frame_w); //+ offx if (right_bgcol) { if (!*right_text) stringstartposOption -= 60; @@ -210,9 +210,9 @@ void CMenuItem::paintItemSlider( const bool select_mode, const int &item_height, return; int stringwidth = 0; if (right_text != NULL) { - stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("U999", true) ; + stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("U999") ; } - int stringwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(left_text, true); + int stringwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(left_text); int maxspace = dx - stringwidth - icon_frame_w - stringwidth2 - 10; if(maxspace < slider_lenght){ @@ -863,7 +863,7 @@ void CMenuWidget::calcSize() if(height > ((int)frameBuffer->getScreenHeight() - 10)) height = frameBuffer->getScreenHeight() - 10; - int neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(nameString.c_str(), true); // UTF-8 + int neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(nameString); if (neededWidth > width-48) { width= neededWidth+ 49; } @@ -1345,14 +1345,14 @@ int CMenuOptionNumberChooser::paint(bool selected) int CMenuOptionNumberChooser::getWidth(void) { - int width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(getName(), true); + int width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(getName()); int _lower_bound = lower_bound; int _upper_bound = upper_bound; int m = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getMaxDigitWidth(); int w1 = 0; if (_lower_bound < 0) - w1 += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("-", true); + w1 += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("-"); while (_lower_bound) { w1 += m; _lower_bound /= 10; @@ -1360,7 +1360,7 @@ int CMenuOptionNumberChooser::getWidth(void) int w2 = 0; if (_upper_bound < 0) - w2 += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("-", true); + w2 += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("-"); while (_upper_bound) { w1 += m; _upper_bound /= 10; @@ -1370,11 +1370,11 @@ int CMenuOptionNumberChooser::getWidth(void) if (numberFormatFunction) { std::string s = numberFormatFunction(0); - width += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(s.c_str(), true) - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("0", true); // arbitrary + width += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(s) - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("0"); // arbitrary } else if (numberFormat != "%d") { char format[numberFormat.length()]; snprintf(format, numberFormat.length(), numberFormat.c_str(), 0); - width += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(format, true) - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("0", true); + width += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(format) - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("0"); } return width + 10; /* min 10 pixels between option name and value. enough? */ @@ -1710,17 +1710,17 @@ int CMenuOptionChooser::paint( bool selected) int CMenuOptionChooser::getWidth(void) { int ow = 0; - int tw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(getName(), true); + int tw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(getName()); int width = tw; for(unsigned int count = 0; count < options.size(); count++) { ow = 0; if (options[count].valname) ow = g_Font[SNeutrinoSettings::FONT_TYPE_MENU] - ->getRenderWidth(options[count].valname, true); + ->getRenderWidth(options[count].valname); else ow = g_Font[SNeutrinoSettings::FONT_TYPE_MENU] - ->getRenderWidth(g_Locale->getText(options[count].value), true); + ->getRenderWidth(g_Locale->getText(options[count].value)); if (tw + ow > width) width = tw + ow; @@ -1979,7 +1979,7 @@ int CMenuForwarder::getHeight(void) const int CMenuForwarder::getWidth(void) { const char *_name = (name == NONEXISTANT_LOCALE) ? nameString.c_str() : g_Locale->getText(name); - int tw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(_name, true); + int tw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(_name); fb_pixel_t bgcol = 0; std::string option_name = getOption(); @@ -1987,7 +1987,7 @@ int CMenuForwarder::getWidth(void) bgcol = jumpTarget->getColor(); if (!option_name.empty()) - tw += 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(option_name.c_str(), true); + tw += 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(option_name); else if (bgcol) tw += 10 + 60; @@ -2087,7 +2087,7 @@ int CMenuSeparator::getWidth(void) w = 30; /* 15 pixel left and right */ const char *l_name = getName(); if ((type & STRING) && *l_name) - w += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(l_name, true); + w += g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(l_name); return w; } @@ -2119,7 +2119,7 @@ int CMenuSeparator::paint(bool selected) if (*l_name) { - int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(l_name, true); // UTF-8 + int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(l_name); /* if no alignment is specified, align centered */ if (type & ALIGN_LEFT) diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index cb88930de..236e4b0c2 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -131,7 +131,7 @@ int CMessageBox::getButtonWidth() neutrino_locale_t localeMsg[localeMsgCount] = {LOCALE_MESSAGEBOX_YES, LOCALE_MESSAGEBOX_NO, LOCALE_MESSAGEBOX_CANCEL, LOCALE_MESSAGEBOX_OK, LOCALE_MESSAGEBOX_BACK}; int MaxButtonTextWidth = 0; for (int i = 0; i < localeMsgCount; i++) - MaxButtonTextWidth = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(localeMsg[i]), true), MaxButtonTextWidth); + MaxButtonTextWidth = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(localeMsg[i])), MaxButtonTextWidth); return MaxButtonTextWidth + i_maxw + 36 + (RADIUS_LARGE / 2); } diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 9b8426251..282df39fd 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -341,7 +341,7 @@ void CMsgBox::refreshFoot(void) //const char* text; - int MaxButtonTextWidth = m_pcFontFoot->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_CANCEL), true); // UTF-8 + int MaxButtonTextWidth = m_pcFontFoot->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_CANCEL)); int ButtonWidth = 20 + 33 + MaxButtonTextWidth; int ButtonSpacing = (m_cBoxFrameFootRel.iWidth - 20- (ButtonWidth*3) ) / 2; int xpos = m_cBoxFrameFootRel.iX; diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 8e393f57b..71d5816b1 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -179,7 +179,7 @@ CShellWindow::~CShellWindow() int iw, ih; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iw, &ih); Font *font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; - int b_width = font->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_OK), true) + 36 + ih + (RADIUS_LARGE / 2); + int b_width = font->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_OK)) + 36 + ih + (RADIUS_LARGE / 2); int fh = font->getHeight(); int b_height = std::max(fh, ih) + 8 + (RADIUS_LARGE / 2); int xpos = frameBuffer->getScreenWidth() - b_width; diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 146269d70..00da93c2e 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -114,7 +114,7 @@ void CStringInput::init() width = std::max(size*input_w + 2*offset, (int) frameBuffer->getScreenWidth() / 100 * 45); - int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(head.c_str(), true); // UTF-8 + int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(head); if (!(iconfile.empty())) { @@ -130,13 +130,13 @@ void CStringInput::init() { if (hint_1 != NONEXISTANT_LOCALE) { - tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1), true); + tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1)); width = std::max(width, tmp_w + 2*offset); bheight += iheight; } if (hint_2 != NONEXISTANT_LOCALE) { - tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2), true); + tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2)); width = std::max(width, tmp_w + 2*offset); bheight += iheight; } diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index 0f49cbb8b..1807d6a4a 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -66,7 +66,7 @@ void CExtendedInput::Init(void) width = frameBuffer->getScreenWidth() / 100 * 45; - int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name), true); // UTF-8 + int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name)); width = std::max(width, tmp_w + offset); bheight = input_h + 2*offset; @@ -74,13 +74,13 @@ void CExtendedInput::Init(void) { if (hint_1 != NONEXISTANT_LOCALE) { - tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1), true); + tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1)); width = std::max(width, tmp_w + 2*offset); bheight += iheight; } if (hint_2 != NONEXISTANT_LOCALE) { - tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2), true); + tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2)); width = std::max(width, tmp_w + 2*offset); bheight += iheight; } diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index e60946120..f098a0319 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -395,7 +395,7 @@ void CTextBox::refreshTextLineArray(void) aktWord = m_cText.substr(pos_prev, pos - pos_prev + 1); //calculate length of current found word - aktWordWidth = m_pcFontText->getRenderWidth(aktWord, true); + aktWordWidth = m_pcFontText->getRenderWidth(aktWord); //set next start pos pos_prev = pos + 1; @@ -628,10 +628,10 @@ void CTextBox::refreshText(void) { //calculate centered xpos if( m_nMode & CENTER ){ - x_center = ((m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i], true))>>1) - text_Hborder_width; + x_center = ((m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i]))>>1) - text_Hborder_width; } else if ( m_nMode & RIGHT ){ - x_center = ((m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i], true)) - text_Hborder_width*2); + x_center = ((m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i])) - text_Hborder_width*2); if ( m_nMode & SCROLL ) x_center -= SCROLL_FRAME_WIDTH; } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index e05be7ae9..e506c37a7 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2555,7 +2555,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) scrambled_timer = 0; if(g_settings.scrambled_message && videoDecoder->getBlank() && videoDecoder->getPlayState()) { const char * text = g_Locale->getText(LOCALE_SCRAMBLED_CHANNEL); - ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, 5); + ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(text) + 10, 5); } return messages_return::handled; }