Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8615 in orxonox.OLD


Ignore:
Timestamp:
Jun 20, 2006, 12:00:39 PM (18 years ago)
Author:
bensch
Message:

gui: more about the table

Location:
branches/gui/src/lib/gui/gl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/glgui_table.cc

    r8614 r8615  
    6767
    6868
     69  void GLGuiTable::setHeader(unsigned int number, const std::string& headerName)
     70  {
     71    if (number >= this->_headers.size())
     72      this->setColumnCount(number + 1);
     73    this->_headers[number].setText(headerName);
     74  }
     75
     76  void GLGuiTable::setHeader(const std::vector<std::string>& headerNames)
     77  {
     78    for (unsigned int i = 0; i < headerNames.size(); ++i)
     79      this->setHeader(i, headerNames[i]);
     80  }
     81
     82  void GLGuiTable::setEntry(unsigned int column, unsigned int row, const std::string& name)
     83  {
     84    if (column >= this->columnCount() )
     85      this->setColumnCount(column + 1);
     86    if (row >= this->rowCount() )
     87      this->setRowCount(row + 1);
     88    this->_entries[row][column].setText(name);
     89  }
     90
     91  void GLGuiTable::setColumnWidth(unsigned int column, float size)
     92  {
     93    this->_headers[column].setLineWidth(size);
     94    for (unsigned int i = 0; i < this->rowCount(); ++i)
     95      this->_entries[i][column].setLineWidth(size);
     96
     97  }
     98
     99  void GLGuiTable::setRowHeight(unsigned int row, unsigned int size)
     100  {}
     101
     102
    69103
    70104
     
    133167   */
    134168  void GLGuiTable::tick(float dt)
    135   {
    136   }
     169{}
    137170
    138171  /**
  • branches/gui/src/lib/gui/gl/glgui_table.h

    r8614 r8615  
    4141    void setHeader(const std::vector<std::string>& headerNames);
    4242
    43     void setEntry(unsigned int column, unsigned int rowNumber, const std::string& name);
     43    void setEntry(unsigned int column, unsigned int row, const std::string& name);
    4444
    4545    void setColumnWidth(unsigned int column, float size);
    46     void setRowSize(unsigned int row, unsigned int size);
     46    void setRowHeight(unsigned int row, unsigned int size);
    4747
    4848    virtual void tick(float dt);
Note: See TracChangeset for help on using the changeset viewer.