Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

StateBar.cpp

00001 
00006 #include <glui.h>
00007 #include <string>
00008 
00009 #include "LifeVariables.h"
00010 #include "StateBar.h"
00011 
00012 using namespace std;
00013 
00014 StateBar::StateBar(int mainWindowRef, int position) {
00015     fileInfoText = "File: -";
00016     modeStateText = "Rendermode: -";
00017     
00018    if((mainWindowRef==0)&&(position==0)) {
00019      panel = GLUI_Master.create_glui("Renderinformation", 0,150,200);
00020    }
00021    else {
00022      panel = GLUI_Master.create_glui_subwindow(mainWindowRef, position);
00023      panel->set_main_gfx_window(mainWindowRef);
00024    }   
00025    
00026    fileName = panel->add_statictext(&fileInfoText[0]);
00027    panel->add_column(true);
00028    modeState = panel->add_statictext(&modeStateText[0]);  
00029 }
00030 
00031 
00032 void StateBar::updateFileInfo(string fileInfoStr) {
00033     fileInfoText = "File: "+fileInfoStr;
00034     fileName->set_text(&fileInfoText[0]);
00035 }
00036 
00037 void StateBar::updateRenderInfo(string renderInfo) {
00038     modeStateText = "Rendermode: "+renderInfo;
00039     modeState->set_text(&modeStateText[0]);
00040 }

Generated on Mon Dec 12 15:20:26 2005 for CCube by  doxygen 1.4.1