/// <summary> /// Creates an instance of the message box that can be used to show a message to the player. /// </summary> public MessageBox() { int buttonWidth = 40; int buttonHeight = 20; int x = Window.DrawRectangle.Center.X - buttonWidth / 2; int y = Window.DrawRectangle.Bottom - buttonHeight - 4; Button = new TextButton(new Vector2(x, y), "Ok", false); Button.ChangeDimensions(new Vector2(buttonWidth, buttonHeight)); Button.BindTo(Window.DrawRectangle); Button.Color = new Color(196, 69, 69); Window.ChangeStyle(Container.Style.SolidColorWithBevel); }
/// <summary> /// A message box that allows the user to enter input. /// </summary> public TextInputBox() { _textBox = new Textbox(Window.DrawRectangle.X + (BezelSize), Window.DrawRectangle.Y + Window.DrawRectangle.Height / 2 - (20), Window.DrawRectangle.Width - (BezelSize * 2), 10); _textBox.BindTo(Window.DrawRectangle); int buttonWidth = (40); int buttonHeight = (20); int x = Window.DrawRectangle.Center.X - buttonWidth / 2; int y = Window.DrawRectangle.Bottom - buttonHeight - (4); Button = new TextButton(new Vector2(x, y), "Ok", false); Button.ChangeDimensions(new Vector2(buttonWidth, buttonHeight)); Button.BindTo(Window.DrawRectangle); Button.Color = new Color(196, 69, 69); }