Ejemplo n.º 1
0
void C4ChatControl::ChatSheet::ResetUnread() {
  // mark messages as read
  if (fHasUnread) {
    fHasUnread = false;
    SetCaptionColor();
  }
}
Ejemplo n.º 2
0
GUIButton::GUIButton()
{
	Init();
	SetCaption(NULL);
	SetCaptionFont(NULL);
	SetCaptionColor(DEFAULT_TEXT_COLOR);
}
Ejemplo n.º 3
0
GUIButton::GUIButton(string name)
{
	Init();
	SetCaption(NULL);
	SetCaptionFont(NULL);
	SetCaptionColor(DEFAULT_TEXT_COLOR);
	SetName(name);
}
Ejemplo n.º 4
0
GUITextBox::GUITextBox()
{
	Init();
	SetCaption(NULL);
	SetCaptionFont(NULL);
	SetCaptionColor(DEFAULT_TEXT_COLOR);
	SetText("");
	SetTextFont(NULL);
	SetTextColor(DEFAULT_TEXT_COLOR);
	SetTextCaretPos(0);
	SetShift(false);
	SetTextLength(0);
	SetMaxTextLength(DEFAULT_MAX_TEXT_LENGTH);
}
Ejemplo n.º 5
0
void C4ChatControl::ChatSheet::AddTextLine(const char *szText, uint32_t dwClr) {
  // strip stuff that would confuse Clonk
  StdStrBuf sText;
  sText.Copy(szText);
  for (char c = '\x01'; c < ' '; ++c) sText.ReplaceChar(c, ' ');
  // convert incoming UTF-8
  convUTF8toWindows(sText);
  // add text line to chat box
  CStdFont *pUseFont = &C4GUI::GetRes()->TextFont;
  pChatBox->AddTextLine(sText.getData(), pUseFont, dwClr, true, false);
  pChatBox->ScrollToBottom();
  // sheet now has unread messages if not selected
  if (!fHasUnread && !IsActiveSheet()) {
    fHasUnread = true;
    SetCaptionColor(C4GUI_Caption2FontClr);
  }
}
Ejemplo n.º 6
0
GUIControl::GUIControl()
{
	prev_key_update = 0;
	SetPatternCount(0);
	SetCurrentPattern(0);
	SetFocus(true);
	SetEnabled(true);
	SetDead(false);
	SetLastCursorPos(0);
	SetLastPressState(0);
	SetLastSentMsg(0);
	SetLastPressedKey(0);
	SetCaption(NULL);
	SetCaptionFont(NULL);
	SetCaptionColor(DEFAULT_TEXT_COLOR);
	SetSelectedCaptionColor(DEFAULT_TEXT_COLOR);
	SetPressedCaptionColor(DEFAULT_TEXT_COLOR);
	SetCaptionX(0);
	SetCaptionY(0);
	sgns.resize(0);
	_draw_border = false;
}
Ejemplo n.º 7
0
/**
  * \param r red component of caption color
  * \param g green component of caption color
  * \param b blue component of caption color
  * \param a transparency
  *
  * Converts the four parameters R,G,B,A into glictColor and passes
  * them to glictContainer::SetCaptionColor(glictColor).
  *
  * \sa glictContainer::SetCaptionColor(glictColor), glictPanel::Paint()
  */
void glictContainer::SetCaptionColor(double r, double g, double b, double a){
    glictColor c;
    c.r = r; c.g = g; c.b = b; c.a = a;
    SetCaptionColor(c);
}