/// <summary> /// Set defaults for windows. /// </summary> /// <param name="tbt">Title bar color/param> /// <param name="ntbt">Unselected title bar.</param> /// <param name="bt">Border color</param> /// <param name="tbw">Title bar width</param> /// <param name="bm">Border margin</param> public void SetWindowDefaults(Color tbt, Color ntbt, Color bt, UIFont wtf, int tbw) { TextureGen tex = new TextureGen(Graphics); DefaultTitleBarTexture = tex.GenerateSolidColor(tbt); DefaultBorderTexture = tex.GenerateSolidColor(bt); DefaultTitleBarWidth = tbw; WindowTitleFont = wtf; DefaultNonSelectedWindow = tex.GenerateSolidColor(ntbt); }
/// <summary> /// Generate a new graphics system. /// </summary> /// <param name="graphics">GraphicDevice game will use</param> /// <param name="font">Default Font information</param> public UISystem(GraphicsDevice graphics, UIFont font) { Graphics = graphics; WindowElements = new List <UIWindow>(); Toolbars = new List <UIToolbar>(); TextureGen gen = new TextureGen(Graphics); SetWindowDefaults(gen.GenerateSolidColor(Color.DarkBlue), gen.GenerateSolidColor(Color.Gray), gen.GenerateSolidColor(Color.LightGray), font, 16); SetButtonDefaults(gen.GenerateSolidColor(Color.Gray), gen.GenerateSolidColor(Color.DarkGray), font); SetToolbarDefaults(gen.GenerateSolidColor(Color.Gray), font); SetTextBoxDefaults(font); }