public Window(Vector2 pos, Vector2 size, int bor, IGUIManager manager) { position = pos; this.size = size; border = bor; guiManager = manager; Color[] data = new Color[1]; Color[] data4 = new Color[1]; data[0] = Color.FromNonPremultiplied(210, 210, 210, 220); tex1 = new Texture2D(guiManager.GetGraphics(), 1, 1); tex1.SetData(data); data4[0] = Color.FromNonPremultiplied(100, 100, 100, 255); tex4 = new Texture2D(guiManager.GetGraphics(), 1, 1); tex4.SetData(data4); lines = new Line[4]; lines[0] = new Line(tex4, position - new Vector2(border, border), new Vector2(size.X + border * 2, border)); lines[1] = new Line(tex4, position - new Vector2(border, border), new Vector2(border, size.Y + border * 2)); lines[2] = new Line(tex4, new Vector2(position.X + size.X, position.Y - border), new Vector2(border, size.Y + border * 2)); lines[3] = new Line(tex4, new Vector2(position.X - border, position.Y + size.Y), new Vector2(size.X + border, border)); manager.AddGui(this); }
public TextField(Vector2 pos, Vector2 size, IGUIManager manager) : base(pos, size, 3, manager) { position = pos; this.size = size; guiManager = manager; manager.AddGui(this); text = string.Empty; }
public Label(Vector2 pos, Vector2 size, String text, Justification just, IGUIManager manager) : base(pos, size, 1, manager) { position = pos; this.size = size; this.text = text; guiManager = manager; this.just = just; manager.AddGui(this); }
public ListBox(int width, int height, SpriteFont font, IGUIManager manager) : base(new Vector2(0,0), new Vector2(width, height), 0, manager) { size = new Vector2(width, height); items = new List<String>(); this.font = font; fontSize = font.MeasureString("test"); max = (int)((height - 40) / fontSize.Y); guiManager = manager; guiManager.AddGui(this); }