Changeset 9869 in orxonox.OLD for trunk/src/lib/network/monitor/network_stats_widget.cc
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/monitor/network_stats_widget.cc
r9656 r9869 20 20 #include "peer_info.h" 21 21 22 #include "loading/resource_manager.h" 23 22 24 #include "multi_type.h" 23 25 24 26 #include "shell_command.h" 25 26 #include "loading/resource_manager.h"27 27 28 28 // this fcuk does not work! … … 30 30 // ->setAlias("ProxyGui"); 31 31 32 33 32 HostWidget::HostWidget(const std::string& name, const IP& ip) 34 33 : GLGuiBox(OrxGui::Horizontal) … … 57 56 { 58 57 if(_font == NULL) 59 _font = new Font(Resource Manager::getInstance()->getDataDir() + "/fonts/arial.ttf", 20);58 _font = new Font(Resources::ResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/arial.ttf", 20); 60 59 61 60 //this->_name.setFont(*_font); … … 211 210 //======================================================// 212 211 212 213 ObjectListDefinition(NetworkStatsWidget); 213 214 /** 214 215 * @brief standard constructor … … 273 274 NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL; 274 275 275 #include "class_list.h"276 277 276 void NetworkStatsWidget::toggleGUI() 278 277 { 279 BaseObject* bo = NULL; 280 const std::list<BaseObject*>* ls = ClassList::getList(CL_NETWORK_MONITOR); 281 if (ls != NULL && !ls->empty()) 282 bo = ls->front(); 283 284 if (bo != NULL && NetworkStatsWidget::_statsWidget == NULL) 285 { 286 NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(dynamic_cast<NetworkMonitor*> (bo)); 278 NetworkMonitor* monitor; 279 if (!NetworkMonitor::objectList().empty()) 280 monitor = NetworkMonitor::objectList().front(); 281 282 if (monitor != NULL && NetworkStatsWidget::_statsWidget == NULL) 283 { 284 NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(monitor); 287 285 NetworkStatsWidget::_statsWidget->showAll(); 288 286 }
Note: See TracChangeset
for help on using the changeset viewer.