Пример #1
0
 public override void DeleteNestedObjects()
 {
     PlayButton.DeleteNestedObjects();
     PlayButton = null;
     ExitButton.DeleteNestedObjects();
     ExitButton = null;
 }
Пример #2
0
 public override void DeleteNestedObjects()
 {
     if (DoneButton != null)
     {
         DoneButton.DeleteNestedObjects();
         DoneButton = null;
     }
 }
Пример #3
0
        public void CreateDoneButton()
        {
            var size     = new Vector2f(60, 60);
            var position = new Vector2f(
                Initializer.Window.GetView().Center.X - size.X / 2,
                Initializer.Window.GetView().Center.Y - size.Y / 2
                );

            DoneButton          = new RectangularSpriteButton(position, size, ResourceLoader.DoneButtonSprites);
            DoneButton.Clicked += DoneButton_Clicked;
        }
Пример #4
0
        public MenuInterface()
        {
            var size     = new Vector2f(120, 60);
            var position = new Vector2f(size.X, Initializer.WindowSize.Y / 4);

            PlayButton          = new RectangularSpriteButton(position, size, ResourceLoader.PlayButtonSprites);
            PlayButton.Clicked += PlayButton_Clicked;

            position.Y         += size.Y * 1.5f;
            ExitButton          = new RectangularSpriteButton(position, size, ResourceLoader.ExitButtonSprites);
            ExitButton.Clicked += ExitButton_Clicked;
        }