//======================================================================================= // CFuiStat: Display statistic info //======================================================================================= CFuiStat::CFuiStat(Tag idn, const char *filename) :CFuiWindow(idn,filename,240,400,0) { strncpy(text,"SYSTEM STATISTICS",255); title = 1; close = 1; zoom = 0; mini = 0; U_INT wit = MakeRGBA(255,255,255,255); SetTransparentMode(); //--------Create info canvas ------------------------------ info = new CFuiCanva(10,10,220,380,this); AddChild('info',info,"",FUI_TRANSPARENT,wit); //--------Display subsystems ------------------------------ CFuiWindow::ReadFinished(); //-------------------------------------------------- CVehicleObject *veh = globals->pln; pit = (veh)?(veh->GetPIT()):(0); tcm = globals->tcm; txw = globals->txw; m3d = globals->m3d; dbc = globals->dbc; }
//===================================================================================== // Window for engine data plotting //===================================================================================== CFuiPlot::CFuiPlot(Tag idn, const char *filename) :CFuiWindow(idn,filename,900,400,0) { SetTransparentMode(); title = 1; close = 1; zoom = 0; mini = 0; SetText("PLOTTER"); //--- Init group box ----------------------------------- gBOX = new CFuiGroupBox(0,0,120,400,this); gBOX->RazProperty(FUI_TRANSPARENT); AddChild('grpb',gBOX,""); //--- Init Canva 1 ------------------------------------- cnv1 = new CFuiCanva(120,0,780,200,this); cnv1->SetProperty(FUI_TRANSPARENT); AddChild('cnv1',cnv1,""); //--- Init canva 2 ------------------------------------- cnv2 = new CFuiCanva(120,200,780,200,this); cnv2->SetProperty(FUI_TRANSPARENT); AddChild('cnv1',cnv2,""); //--- Init Popup menu 1--------------------------------- pop1 = new CFuiPopupMenu(10, 8,100,30,this); gBOX->AddChild('pop1',pop1,"DATA to PLOT"); //--- Init Popup menu 2--------------------------------- pop2 = new CFuiPopupMenu(10,208,100,30,this); gBOX->AddChild('pop2',pop2,"DATA to PLOT"); //--- Init scaler n°1 ---------------------------------- psc1.scale = 1; // Initial scale upr1 = new CFuiButton(12,80,20,20,this); upr1->SetRepeat(0.25); gBOX->AddChild('upr1',upr1,"+"); psc1.tex = new CFuiTextField(34,80,40,20,this); psc1.tex->SetProperty(FUI_TRANSPARENT); gBOX->AddChild('scl1',psc1.tex,"1.00"); lwr1 = new CFuiButton(76,80,20,20,this); lwr1->SetRepeat(0.25); gBOX->AddChild('lwr1',lwr1,"-"); //--- Init scaler n°2 ---------------------------------- psc2.scale = 1; // Initial scale upr2 = new CFuiButton(12,280,20,20,this); upr2->SetRepeat(0.25); gBOX->AddChild('upr2',upr2,"+"); psc2.tex = new CFuiTextField(34,280,40,20,this); psc2.tex->SetProperty(FUI_TRANSPARENT); gBOX->AddChild('scl2',psc2.tex,"1.00"); lwr2 = new CFuiButton(76,280,20,20,this); lwr2->SetRepeat(0.25); gBOX->AddChild('lwr2',lwr2,"-"); //--- Init mother vehicle ----------------------------- mveh = globals->pln; if (0 == mveh) Close(); //------------------------------------------------------ CFuiWindow::ReadFinished(); strt = 0; psc1.plot = &p1; p1.Init(cnv1,fnts,pop1,mveh); psc2.plot = &p2; p2.Init(cnv2,fnts,pop2,mveh); //------------------------------------------------------ time = 0; ppxu = p1.GetWidth() / 20; xF = p1.GetXF(); }