/// <summary> /// Creates the options box. /// </summary> /// <param name="positon">Top left corner of the box.</param> /// <param name="InfoText">Text displayed above the buttons contained</param> /// <param name="buttonStrings">Array of the strings to put on the buttons</param> public OptionsBox(Rectangle positon, String InfoText, String[] buttonStrings) { InterfaceTextureHolder holder = InterfaceTextureHolder.Holder; font = holder.Fonts[(int)ConstantHolder.Fonts.defaultFont]; this.position = positon; GUIManager manager = GUIManager.getManager(); displayText = InfoText; buttons = new Button[buttonStrings.Length]; backgroundSprite = holder.GUISprites[(int)ConstantHolder.GUIMemberImages.AbilityBackground].copySprite();//TBI: actual background for an options box. for (int i = 0; i < buttonStrings.Length; ++i) { //buttons[i] = manager.MakeTextButton(); } }
/// <summary> /// Removes this button from the GUIManager /// </summary> public void clear() { GUIManager.getManager().ClearButton(this); }