Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 24, 2006, 5:07:55 PM (18 years ago)
Author:
bensch
Message:

more gui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/monitor/network_monitor.cc

    r9431 r9438  
    3131
    3232
    33 SHELL_COMMAND(showGUI, NetworkMonitor, showGUI);
    34 SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI);
     33#include "network_stats_widget.h"
     34
     35SHELL_COMMAND(gui, NetworkMonitor, toggleGUI);
    3536SHELL_COMMAND(debug, NetworkMonitor, debug);
    3637
     
    7273    }
    7374  }
     75  this->box = NULL;
    7476}
    7577
     
    196198 * this displays the network monitor gui
    197199 */
    198 void NetworkMonitor::showGUI()
     200void NetworkMonitor::toggleGUI()
    199201{
    200202  if (this->box == NULL)
     
    202204    this->box = new OrxGui::GLGuiBox(OrxGui::Vertical);
    203205    {
    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
    211209    }
    212210
    213211    this->box->showAll();
    214212    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}
    236220
    237221/**
Note: See TracChangeset for help on using the changeset viewer.