Changeset 9330 in orxonox.OLD for branches/proxy/src/util/network_stats_widget.cc
- Timestamp:
- Jul 18, 2006, 8:02:10 PM (19 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/util/network_stats_widget.cc
r9329 r9330 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include " glgui_energywidget.h"18 #include "network_stats_widget.h" 19 19 20 20 namespace OrxGui … … 23 23 * @brief standard constructor 24 24 */ 25 GLGuiEnergyWidget::GLGuiEnergyWidget ()25 NetworkStatsWidget::NetworkStatsWidget () 26 26 { 27 // this->setClassID(CL_PROTO_ID, " GLGuiEnergyWidget");27 // this->setClassID(CL_PROTO_ID, "NetworkStatsWidget"); 28 28 29 29 this->_bar.setSize2D(100, 30); 30 this->pack(&this->_name);31 30 this->pack(&this->_valueText); 32 31 this->_bar.setParent2D(&this->_valueText); 33 32 34 this->_name.setForegroundColor(Color(1,1,1,.8));35 33 this->_valueText.setChangedTextColor(Color::white); 36 34 … … 51 49 * @brief standard deconstructor 52 50 */ 53 GLGuiEnergyWidget::~GLGuiEnergyWidget ()51 NetworkStatsWidget::~NetworkStatsWidget () 54 52 { 55 53 } 56 54 57 55 58 void GLGuiEnergyWidget::setDisplayedName(const std::string& name) 59 { 60 this->_name.setText(name); 61 this->_bar.setWidgetSize(this->_name.getSize2D()); 62 } 63 64 void GLGuiEnergyWidget::setMaximum(float max) 56 void NetworkStatsWidget::setMaximum(float max) 65 57 { 66 58 this->_bar.setMaximum(max); 67 59 } 68 60 69 void GLGuiEnergyWidget::setValue(float value)61 void NetworkStatsWidget::setValue(float value) 70 62 { 71 63 MultiType val(value); … … 79 71 } 80 72 81 void GLGuiEnergyWidget::resize()73 void NetworkStatsWidget::resize() 82 74 { 83 75 GLGuiBox::resize(); … … 85 77 86 78 87 void GLGuiEnergyWidget::showing()79 void NetworkStatsWidget::showing() 88 80 { 89 this->_name.show();90 81 this->_valueText.show(); 91 82 this->_bar.show(); 92 83 } 93 84 94 void GLGuiEnergyWidget::hiding()85 void NetworkStatsWidget::hiding() 95 86 { 96 this->_name.hide();97 87 this->_valueText.hide(); 98 88 this->_bar.hide();
Note: See TracChangeset
for help on using the changeset viewer.