- Timestamp:
- Jul 18, 2006, 8:02:10 PM (18 years ago)
- Location:
- branches/proxy/src/util
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/util/Makefile.am
r8068 r9330 14 14 singleplayer_shootemup.cc \ 15 15 \ 16 \ 17 \ 16 18 mission_goal.cc\ 17 19 kill_target.cc\ … … 24 26 animation/animation_player.cc \ 25 27 \ 26 track/pilot_node.cc 28 track/pilot_node.cc \ 29 \ 30 network_stats_widget.cc 27 31 28 32 # track/track_manager.cc \ … … 50 54 animation/t_animation.h \ 51 55 \ 52 track/pilot_node.h 56 track/pilot_node.h \ 57 \ 58 network_stats_widget.h 59 53 60 54 61 # track/track_manager.h \ -
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(); -
branches/proxy/src/util/network_stats_widget.h
r9329 r9330 1 1 /*! 2 * @file glgui_energywidget.h2 * @file network_stats_widget.h 3 3 * @brief Definition of an EnergyWidget, that displays a bar and a Text 4 4 */ 5 5 6 #ifndef _ GLGUI_ENERGY_WIDGET_H7 #define _ GLGUI_ENERGY_WIDGET_H6 #ifndef _NETWORK_STATS_WIDGET_H 7 #define _NETWORK_STATS_WIDGET_H 8 8 9 9 #include "glgui_box.h" … … 11 11 #include "glgui_text.h" 12 12 13 #include "network/ip.h" 14 15 13 16 namespace OrxGui 14 17 { 15 18 16 //! A class for ...17 class GLGuiEnergyWidget : public GLGuiBox19 //! A class to display network Statistics. 20 class NetworkStatsWidget : public GLGuiBox 18 21 { 19 22 20 23 public: 21 GLGuiEnergyWidget();22 virtual ~ GLGuiEnergyWidget();24 NetworkStatsWidget(); 25 virtual ~NetworkStatsWidget(); 23 26 24 void setDisplayedName(const std::string& name); 27 void setUpstream(unsigned int upstream); 28 void setDownstream(unsigned int upstream); 29 25 30 void setMaximum(float max); 26 31 void setValue(float value); 32 33 34 //void rebuildConnectedHosts(std::vector<hosts> hosts); 27 35 28 36 protected: … … 32 40 33 41 private: 34 GLGuiText _name; 35 GLGuiText _valueText; 36 GLGuiBar _bar; 42 IP _ip; 43 GLGuiText _ipText; 37 44 45 GLGuiText _upstreamText; 46 GLGuiText _downstreamText; 47 48 std::vector<GLGuiText> _connectedHosts; 49 50 GLGuiText _serverIP; 51 52 53 GLGuiText _valueText; 54 GLGuiBar _bar; 38 55 }; 39 56 } 40 #endif /* _ GLGUI_ENERGY_WIDGET_H */57 #endif /* _NETWORK_STATS_WIDGET_H */
Note: See TracChangeset
for help on using the changeset viewer.