public MenuItemOption(OptionType optionType, Vector2 position) { _type = optionType; Position = position; _leftButton = new Button(Vector2.Zero, "", Globals.Content.Load<Texture2D>("LeftArrow"), Globals.Content.Load<Texture2D>("LeftArrow"), Globals.Content.Load<Texture2D>("LeftArrow")); _rightButton = new Button(Vector2.Zero, "", Globals.Content.Load<Texture2D>("RightArrow"), Globals.Content.Load<Texture2D>("RightArrow"), Globals.Content.Load<Texture2D>("RightArrow")); _leftButton.Position = new Point((int)Position.X, (int)Position.Y); _rightButton.Position = new Point((int)Position.X + 100, (int)Position.Y); ChangeOption(1.0f); }
public PopupWindow(String text) { ReadyToRemove = false; message = text; Origin = new Vector2(200, 220); windowSize = new Rectangle((int)Origin.X, (int)Origin.Y, 600, 400); var butTex = Globals.Content.Load<Texture2D>("CloseButton"); backgroundTexture = Globals.Content.Load<Texture2D>("currenthealth"); var ButtonLocation = Origin + new Vector2(windowSize.X, windowSize.Y); closeButton = new Button(ButtonLocation, "", butTex, butTex, butTex); closeButton.isSelected = true; }