// Called when the game state has been initiated protected override void onInit() { c= new Panel(); l= new Label("You have such EXQUISITE taste. Hmm, good?probs\tOK!"); p= new ProgressBar(); b= new Button(); s= new GUISet(); t= new Tooltip(); x= new TextBox(); c.bEnabled= false; c.size= new Size2(200, 200); l.size= new Size2(100, 30); p.location= new Point2(400, 10); p.size= new Size2(200, 30); p.progress= 1f; p.tooltip= t; b.location= new Point2(200, 100); b.size= new Size2(100, 32); b.border.setBorderSize(1f); b.border.setBorderStyle(BorderStyle.SOLID); b.text= "DERPSKI"; t.size= new Size2(100, 100); GUIColorPacket bg= t.bgColors; bg.normal= new Color(255, 0, 0); t.bgColors= bg; t.bgColors.setNormal(new Color(255, 0, 0)); //p.bHorizontal= false; p.text= "100/100"; p.bDisplayText= true; x.location= new Point2(40, 40); x.size= new Size2(100, 24); p.includeEvent("onProgressChanged", (GUIEvent)(delegate(GUIControl ctrl) { p.text= (p.progress*100f).ToString("N0")+"/100"; })); s.addControl(x); game.gui.addGUISet("splash_001", s); game.gui.open("splash_001"); game.window.viewport.clearColor= new Color("#000"); }
// Adds the given gui set to the gui manager public virtual void addGUISet(string key, GUISet control) { csets.add(key, control); control.i_onGUIAdd(ref game); }