Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 27, 2004, 2:02:11 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/updater: flags now working perfectly. not the fastest way to implement this, but still….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc

    r3298 r3299  
    15131513
    15141514/**
     1515   \brief ereases the Text of a Label
     1516*/
     1517void Label::ereaseText(void)
     1518{
     1519  this->setTitle("");
     1520}
     1521
     1522/**
     1523    \brief appends some Text to a Label
     1524    \param textToAppend The text that will be appended to this Label
     1525*/
     1526void Label::appendText(char* textToAppend)
     1527{
     1528  if (this->title)
     1529    {
     1530      char* tmpTitle = new char[strlen(this->title)+strlen(textToAppend)+1];
     1531      strcpy(tmpTitle, title); 
     1532      strcat(tmpTitle, textToAppend);
     1533      delete []this->title;
     1534      this->title = tmpTitle;
     1535    }
     1536  else
     1537    {
     1538      this->title = new char[strlen(textToAppend)];
     1539    }
     1540 
     1541#ifdef HAVE_GTK2
     1542  gtk_label_set_text (GTK_LABEL (this->widget), title);
     1543#endif /* HAVE_GTK2 */
     1544}
     1545
     1546/**
     1547    \brief Appends some integer to the Label
     1548    \param intToAppend The Int that will be added.
     1549   
     1550    it does this by just converting the int into a char* and send it to appendText
     1551*/
     1552void Label::appendInt(int intToAppend)
     1553{
     1554  char append [20];
     1555  sprintf(append, "%d", intToAppend);
     1556  this->appendText(append);
     1557}
     1558
     1559
     1560/**
    15151561   \brief get the Text of a Label
    15161562   \return The Text the Label holds.
Note: See TracChangeset for help on using the changeset viewer.