CComponentsText: add overloaded member setText() for int vars

Origin commit data
------------------
Branch: ni/coolstream
Commit: fb64fb5d35
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-10 (Wed, 10 Apr 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2013-04-10 20:24:20 +02:00
parent 17aad85d79
commit c769373230
2 changed files with 12 additions and 5 deletions

View File

@@ -194,6 +194,7 @@ class CComponentsText : public CComponentsItem
virtual void setText(const char* ctext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL); virtual void setText(const char* ctext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
virtual void setText(const std::string& stext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL); virtual void setText(const std::string& stext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
virtual void setText(neutrino_locale_t locale_text, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL); virtual void setText(neutrino_locale_t locale_text, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
virtual void setText(const int digit, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
virtual void removeLineBreaks(std::string& str); virtual void removeLineBreaks(std::string& str);
//get a Text Box object, so it's possible to get access directly to its methods //get a Text Box object, so it's possible to get access directly to its methods

View File

@@ -176,6 +176,12 @@ void CComponentsText::setText(const std::string& stext, const int mode, Font* fo
} }
void CComponentsText::setText(const int digit, const int mode, Font* font_text)
{
string s_digit = iToString(digit);
setText(s_digit, mode, font_text);
}
void CComponentsText::paintText(bool do_save_bg) void CComponentsText::paintText(bool do_save_bg)
{ {
paintInit(do_save_bg); paintInit(do_save_bg);