mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CTextBox: Add Flag m_renderMode (Font::FULLBG) for RenderString()
This commit is contained in:
@@ -185,6 +185,8 @@ void CTextBox::initVar(void)
|
|||||||
|
|
||||||
m_cLineArray.clear();
|
m_cLineArray.clear();
|
||||||
|
|
||||||
|
m_renderMode = 0;
|
||||||
|
|
||||||
// max_width = 0;
|
// max_width = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,7 +641,7 @@ void CTextBox::refreshText(void)
|
|||||||
//TRACE("[CTextBox] %s Line %d m_cFrame.iX %d m_cFrameTextRel.iX %d\r\n", __FUNCTION__, __LINE__, m_cFrame.iX, m_cFrameTextRel.iX);
|
//TRACE("[CTextBox] %s Line %d m_cFrame.iX %d m_cFrameTextRel.iX %d\r\n", __FUNCTION__, __LINE__, m_cFrame.iX, m_cFrameTextRel.iX);
|
||||||
m_pcFontText->RenderString(m_cFrame.iX + m_cFrameTextRel.iX + text_Hborder_width + x_center,
|
m_pcFontText->RenderString(m_cFrame.iX + m_cFrameTextRel.iX + text_Hborder_width + x_center,
|
||||||
y+m_cFrame.iY, m_cFrameTextRel.iWidth, m_cLineArray[i].c_str(),
|
y+m_cFrame.iY, m_cFrameTextRel.iWidth, m_cLineArray[i].c_str(),
|
||||||
m_textColor);
|
m_textColor, 0, m_renderMode | Font::IS_UTF8);
|
||||||
m_old_cText = m_cText;
|
m_old_cText = m_cText;
|
||||||
y += m_nFontTextHeight;
|
y += m_nFontTextHeight;
|
||||||
}
|
}
|
||||||
|
@@ -134,6 +134,7 @@ class CTextBox
|
|||||||
int m_nMaxTextWidth;
|
int m_nMaxTextWidth;
|
||||||
|
|
||||||
int m_nMode;
|
int m_nMode;
|
||||||
|
int m_renderMode;
|
||||||
|
|
||||||
int m_nNrOfPages;
|
int m_nNrOfPages;
|
||||||
int m_nNrOfLines;
|
int m_nNrOfLines;
|
||||||
@@ -183,6 +184,7 @@ class CTextBox
|
|||||||
void setTextBorderWidth(int Hborder, int Vborder);
|
void setTextBorderWidth(int Hborder, int Vborder);
|
||||||
void setTextFont(Font* font_text);
|
void setTextFont(Font* font_text);
|
||||||
void setTextMode(const int text_mode){m_nMode = text_mode;};
|
void setTextMode(const int text_mode){m_nMode = text_mode;};
|
||||||
|
void setTextRenderModeFullBG(bool mode){ m_renderMode = (mode) ? Font::FULLBG : 0; };
|
||||||
void setBackGroundColor(CFBWindow::color_t textBackgroundColor){m_textBackgroundColor = textBackgroundColor;};
|
void setBackGroundColor(CFBWindow::color_t textBackgroundColor){m_textBackgroundColor = textBackgroundColor;};
|
||||||
void setWindowPos(const CBox* position){m_cFrame = *position;};
|
void setWindowPos(const CBox* position){m_cFrame = *position;};
|
||||||
void setWindowMaxDimensions(const int width, const int height);
|
void setWindowMaxDimensions(const int width, const int height);
|
||||||
|
Reference in New Issue
Block a user