gui/widget/menue.cpp: fix CMenuForwarderNonLocalized::getWidth

This commit is contained in:
[CST] Focus
2013-03-29 17:12:23 +04:00
parent 5964a70854
commit f21b291fcd
2 changed files with 11 additions and 2 deletions

View File

@@ -1846,6 +1846,15 @@ void CMenuForwarderNonLocalized::setText(const char * const Text)
int CMenuForwarderNonLocalized::getWidth(void)
{
int tw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(the_text, true);
const char * option_text = NULL;
if (option)
option_text = option;
else if (option_string)
option_text = option_string->c_str();
if (option_text != NULL)
tw += 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(option_text, true);
return tw;
}
//-------------------------------------------------------------------------------------------------------------------------------

View File

@@ -194,11 +194,11 @@ public:
class CMenuForwarder : public CMenuItem
{
const char * option;
const std::string * option_string;
std::string actionKey;
protected:
const char * option;
const std::string * option_string;
CMenuTarget * jumpTarget;
neutrino_locale_t text;