示例#1
0
void CGUILabel::SetTextW(const CStdStringW &label)
{
  m_textLayout.SetText(label);
  m_scrollInfo.Reset();
  UpdateRenderRect();
  m_invalid = false;
}
示例#2
0
bool CGUILabel::SetAlign(uint32_t align)
{
  bool changed = m_label.align != align;

  m_label.align = align;
  UpdateRenderRect();

  return changed;
}
示例#3
0
bool CGUILabel::SetMaxRect(float x, float y, float w, float h)
{
  CRect oldRect = m_maxRect;

  m_maxRect.SetRect(x, y, x + w, y + h);
  UpdateRenderRect();

  return oldRect != m_maxRect;
}
示例#4
0
void CGUILabel::SetText(const CStdString &label)
{
  if (m_textLayout.Update(label, m_maxRect.Width(), m_invalid))
  { // needed an update - reset scrolling and update our text layout
    m_scrollInfo.Reset();
    UpdateRenderRect();
    m_invalid = false;
  }
}
示例#5
0
bool CGUILabel::SetTextW(const CStdStringW &label)
{
  if (m_textLayout.UpdateW(label, m_maxRect.Width(), m_invalid))
  {
    m_scrollInfo.Reset();
    UpdateRenderRect();
    m_invalid = false;
    return true;
  }
  else
    return false;
}
示例#6
0
void CGUILabel::SetAlign(uint32_t align)
{
  m_label.align = align;
  UpdateRenderRect();
}
示例#7
0
void CGUILabel::SetMaxRect(float x, float y, float w, float h)
{
  m_maxRect.SetRect(x, y, x + w, y + h);
  UpdateRenderRect();
}