public TextBox AddNewTextbox(FloatRectangle relativeRectangle, FontSize fontSize = FontSize.Normal) { TextBox textBox = new TextBox(Graphics, fontSize); _drawables.Add(textBox); textBox.BoundingBox = Graphics.Window.ToAbsoluteRectangle(relativeRectangle); return textBox; }
public ListMenu AddNewListMenu(string title, FloatRectangle relativeRectangle, FontSize fontSize = FontSize.Normal) { ListMenu menu = new ListMenu(title, Graphics, fontSize); menu.BoundingBox = Graphics.Window.ToAbsoluteRectangle(relativeRectangle); AddMenu(menu); return menu; }
public Sprite AddNewSprite(string imageName, FloatRectangle relativeRectangle) { Sprite sprite = new Sprite(Graphics.SpriteBatch, Graphics.Content.Load<Texture2D>(imageName)); _drawables.Add(sprite); sprite.BoundingBox = Graphics.Window.ToAbsoluteRectangle(relativeRectangle); return sprite; }
public DialogWindow AddNewDialogWindow(string title, FloatRectangle relativeRectangle) { DialogWindow menu = new DialogWindow(title, Graphics); menu.BoundingBox = Graphics.Window.ToAbsoluteRectangle(relativeRectangle); AddMenu(menu); return menu; }
public Rectangle ToAbsoluteRectangle(FloatRectangle relative) { return new Rectangle(ToAbsoluteIntX(relative.X), ToAbsoluteIntY(relative.Y), ToAbsoluteIntX(relative.Width), ToAbsoluteIntY(relative.Height)); }