Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9385 in orxonox.OLD for branches/proxy/src/util


Ignore:
Timestamp:
Jul 21, 2006, 1:09:19 PM (18 years ago)
Author:
bensch
Message:

orxonox/proxy: better proxy-width approximation

Location:
branches/proxy/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/util/network_stats_widget.cc

    r9383 r9385  
    5252  : _proxyWidget(proxyName, ip)
    5353  {
     54    this->_clientNameWidth = 100.0f;
    5455    this->pack(&_proxyWidget);
    5556  }
     
    5859  {
    5960    HostWidget* newClient = new HostWidget(name, ip);
     61    newClient->setNameWidth(this->_clientNameWidth);
    6062
    6163    this->pack(newClient);
     
    112114
    113115
     116  void ProxyWidget::setClientNameWidths(float width)
     117  {
     118    this->_clientNameWidth = width;
     119    for (unsigned int i = 0; i < this->_clients.size(); ++i)
     120      this->_clients[i]->setNameWidth(width);
     121  }
     122
    114123  void ProxyWidget::hiding()
    115124  {
     
    135144   */
    136145  NetworkStatsWidget::NetworkStatsWidget ()
    137       : GLGuiBox(Vertical)
     146  : GLGuiBox(Vertical), _thisHost("myName", IP(127, 0, 0 , 0))
    138147  {
    139148    //   this->setClassID(CL_PROTO_ID, "NetworkStatsWidget");
  • branches/proxy/src/util/network_stats_widget.h

    r9383 r9385  
    5353      bool removeClient(const std::string& name, const IP& ip);
    5454
     55      void setClientNameWidths(float width);
     56
    5557
    5658    protected:
     
    6365
    6466      std::vector<HostWidget*>  _clients;
     67      float            _clientNameWidth;
    6568  };
    6669
     
    9295
    9396    private:
    94       IP                     _ip;
    95       GLGuiText              _ipText;
     97      HostWidget             _thisHost;
    9698
    9799      GLGuiText              _upstreamText;
    98100      GLGuiText              _downstreamText;
    99101
    100       std::vector<GLGuiText> _connectedHosts;
     102      std::vector<HostWidget*>_connectedProxies;
    101103
    102104      GLGuiText              _serverIP;
Note: See TracChangeset for help on using the changeset viewer.