#include #include #include "HKEVInfo.h" #include HKEVInfo::HKEVInfo(TGLViewer* viewer,float x,float y) : fViewer(viewer) { fInformationOverlay = new TGLAnnotation(viewer,"", x,y); fInformationOverlay->SetState(TGLOverlayElement::kDisabled); } void HKEVInfo::SetPermanent(TString text) { fPermanent=text; Update(); } void HKEVInfo::ClearAll() { fPermanent=""; fTemporary=""; Update(); } void HKEVInfo::SetTemporary(TString temporary) { fTemporary=temporary; Update(); } void HKEVInfo::AddToTemporary(TString temporary) { fTemporary=fTemporary+"\n"+temporary; Update(); } void HKEVInfo::ClearTemporary(){ fTemporary=""; Update(); } void HKEVInfo::Update() { if(fInformationOverlay!=nullptr) { fInformationOverlay->SetText(fPermanent+"\n \n \n"+fTemporary); fViewer->UpdateScene(); } }