public DebugOverlay(RenderWindow window) { mWindow = window; mTextManager = new TextManager(); mFPSAvg = new Text("Average FPS:") { Position = new System.Drawing.Point(10, 0) }; mFPSCurr = new Text("Current FPS:") { Position = new System.Drawing.Point(10, 15) }; mFPSBest = new Text("Best FPS:") { Position = new System.Drawing.Point(10, 30) }; mFPSWorst = new Text("Worst FPS:") { Position = new System.Drawing.Point(10, 45) }; mTris = new Text("Triangle Count:") { Position = new System.Drawing.Point(10, 60) }; mModes = new Text("???") { Position = new System.Drawing.Point(10, 75) }; mTextManager.AddText(mFPSAvg); mTextManager.AddText(mFPSCurr); mTextManager.AddText(mFPSBest); mTextManager.AddText(mFPSWorst); mTextManager.AddText(mTris); mTextManager.AddText(mModes); mTextManager.ShowAllText(); }
public void RemoveText(Text text) { _OverlayPanel.RemoveChild(text._TextArea.Name); OverlayManager.Singleton.DestroyOverlayElement(text._TextArea.Name); }
//returns a texthandle public string AddText(Text text) { _OverlayPanel.AddChild(text._TextArea); return text._TextArea.Name; }