Changeset 9438 in orxonox.OLD for branches/proxy/src/lib/network/monitor/network_monitor.cc
- Timestamp:
- Jul 24, 2006, 5:07:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_monitor.cc
r9431 r9438 31 31 32 32 33 SHELL_COMMAND(showGUI, NetworkMonitor, showGUI); 34 SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI); 33 #include "network_stats_widget.h" 34 35 SHELL_COMMAND(gui, NetworkMonitor, toggleGUI); 35 36 SHELL_COMMAND(debug, NetworkMonitor, debug); 36 37 … … 72 73 } 73 74 } 75 this->box = NULL; 74 76 } 75 77 … … 196 198 * this displays the network monitor gui 197 199 */ 198 void NetworkMonitor:: showGUI()200 void NetworkMonitor::toggleGUI() 199 201 { 200 202 if (this->box == NULL) … … 202 204 this->box = new OrxGui::GLGuiBox(OrxGui::Vertical); 203 205 { 204 OrxGui::GLGuiBox* waterColorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 205 { 206 OrxGui::GLGuiText* waterColorText = new OrxGui::GLGuiText(); 207 waterColorText->setText("NetworkMonitor"); 208 waterColorBox->pack(waterColorText); 209 } 210 this->box->pack(waterColorBox); 206 NetworkStatsWidget* netStats = new NetworkStatsWidget(); 207 this->box->pack(netStats); 208 211 209 } 212 210 213 211 this->box->showAll(); 214 212 this->box->setAbsCoor2D(300, 40); 215 OrxGui::GLGuiHandler::getInstance()->activate(); 216 // OrxGui::GLGuiHandler::getInstance()->activateCursor(); 217 } 218 } 219 220 221 /** 222 * hides the network monitor gui again 223 */ 224 void NetworkMonitor::hideGUI() 225 { 226 if( this->box == NULL) 227 return; 228 229 OrxGui::GLGuiHandler::getInstance()->deactivate(); 230 // OrxGui::GLGuiHandler::getInstance()->deactivateCursor(); 231 232 delete this->box; 233 this->box = NULL; 234 } 235 213 } 214 else 215 { 216 delete this->box; 217 this->box = NULL; 218 } 219 } 236 220 237 221 /**
Note: See TracChangeset
for help on using the changeset viewer.