Changeset 9266 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 13, 2006, 11:14:32 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_monitor.cc
r9265 r9266 17 17 18 18 #include "network_stream.h" 19 #include "debug.h" 19 20 20 21 #include "network_monitor.h" 21 22 22 // SHELL_COMMAND(gui, MappedWater, toggleGui); 23 SHELL_COMMAND(showGUI, NetworkMonitor, showGUI); 24 SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI); 23 25 // SHELL_COMMAND(output, MappedWater, saveParams); 24 26 … … 38 40 */ 39 41 NetworkMonitor::~NetworkMonitor() 42 {} 43 44 45 /** 46 * adds a client 47 */ 48 void NetworkMonitor::addClient(PeerInfo* node) 49 { 50 this->clientList.push_back(node); 51 } 52 53 /** 54 * adds a proxy server 55 */ 56 void NetworkMonitor::addProxyServer(PeerInfo* node) 57 { 58 this->proxyServerList.push_back(node); 59 } 60 61 /** 62 * adds a master server 63 */ 64 void NetworkMonitor::addMasterServer(PeerInfo* node) 65 { 66 this->masterServerList.push_back(node); 67 } 68 69 /** 70 * removes a client 71 */ 72 void NetworkMonitor::removeClient(PeerInfo* node) 73 { 74 std::list<PeerInfo*>::iterator it = this->clientList.begin(); 75 for(; it != this->clientList.end(); it++) 76 { 77 if( *it == node) 78 { 79 this->clientList.erase(it); 80 return; 81 } 82 } 83 84 PRINTF(2)("Could not remove client from the list, very strange..."); 85 } 86 87 /** 88 * removes a proxy server 89 */ 90 void NetworkMonitor::removeProxyServer(PeerInfo* node) 91 {} 92 93 /** 94 * removes a master server 95 */ 96 void NetworkMonitor::removeMasterServer(PeerInfo* node) 40 97 {} 41 98 … … 63 120 this->box->setAbsCoor2D(300, 40); 64 121 OrxGui::GLGuiHandler::getInstance()->activate(); 65 OrxGui::GLGuiHandler::getInstance()->activateCursor();122 // OrxGui::GLGuiHandler::getInstance()->activateCursor(); 66 123 } 67 else 68 { 69 OrxGui::GLGuiHandler::getInstance()->deactivate(); 70 OrxGui::GLGuiHandler::getInstance()->deactivateCursor(); 71 delete this->box; 72 this->box = NULL; 73 } 124 } 125 126 127 /** 128 * hides the network monitor gui again 129 */ 130 void NetworkMonitor::hideGUI() 131 { 132 if( this->box == NULL) 133 return; 134 135 OrxGui::GLGuiHandler::getInstance()->deactivate(); 136 // OrxGui::GLGuiHandler::getInstance()->deactivateCursor(); 137 138 delete this->box; 139 this->box = NULL; 74 140 } 75 141 -
branches/proxy/src/lib/network/network_monitor.h
r9265 r9266 34 34 35 35 void showGUI(); 36 void hideGUI(); 36 37 37 38 void process();
Note: See TracChangeset
for help on using the changeset viewer.