Example #1
0
 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;
 }
Example #2
0
 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;
 }
Example #3
0
 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;
 }
Example #4
0
 public DialogWindow AddNewDialogWindow(string title, FloatRectangle relativeRectangle)
 {
     DialogWindow menu = new DialogWindow(title, Graphics);
     menu.BoundingBox = Graphics.Window.ToAbsoluteRectangle(relativeRectangle);
     AddMenu(menu);
     return menu;
 }
Example #5
0
 public Rectangle ToAbsoluteRectangle(FloatRectangle relative)
 {
     return new Rectangle(ToAbsoluteIntX(relative.X), ToAbsoluteIntY(relative.Y), ToAbsoluteIntX(relative.Width), ToAbsoluteIntY(relative.Height));
 }