mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsText: add explicit kill methode and add ct_force_text_paint
After hide or kill text will does not paint without ct_force_text_paint, so it is required to add this.
This commit is contained in:
@@ -274,6 +274,7 @@ bool CComponentsText::setTextFromFile(const string& path_to_textfile, const int
|
|||||||
void CComponentsText::paintText(bool do_save_bg)
|
void CComponentsText::paintText(bool do_save_bg)
|
||||||
{
|
{
|
||||||
initCCText();
|
initCCText();
|
||||||
|
if (!is_painted)
|
||||||
paintInit(do_save_bg);
|
paintInit(do_save_bg);
|
||||||
|
|
||||||
if (ct_text_sent && cc_allow_paint)
|
if (ct_text_sent && cc_allow_paint)
|
||||||
@@ -291,8 +292,20 @@ void CComponentsText::hide()
|
|||||||
{
|
{
|
||||||
if (ct_textbox)
|
if (ct_textbox)
|
||||||
ct_textbox->hide();
|
ct_textbox->hide();
|
||||||
ct_old_text = "";
|
|
||||||
CComponents::hide();
|
ct_old_text.clear();
|
||||||
|
CCDraw::hide();
|
||||||
|
ct_force_text_paint = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CComponentsText::kill()
|
||||||
|
{
|
||||||
|
if (ct_textbox)
|
||||||
|
ct_textbox->hide();
|
||||||
|
|
||||||
|
ct_old_text.clear();
|
||||||
|
CCDraw::kill();
|
||||||
|
ct_force_text_paint = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsText::setXPos(const int& xpos)
|
void CComponentsText::setXPos(const int& xpos)
|
||||||
|
@@ -138,6 +138,8 @@ class CComponentsText : public CCTextScreen, public CComponentsItem
|
|||||||
///default members to paint a text box and hide painted text
|
///default members to paint a text box and hide painted text
|
||||||
///hide textbox
|
///hide textbox
|
||||||
void hide();
|
void hide();
|
||||||
|
///remove textbox from screen
|
||||||
|
void kill();
|
||||||
///paint text box, parameter do_save_bg: default = true, causes fill of backckrond pixel buffer
|
///paint text box, parameter do_save_bg: default = true, causes fill of backckrond pixel buffer
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user