示例#1
0
        public MainMenu()
        {
            Buttons = new StackPanel();
            Buttons.HorizontalAlignment = HorizontalAlignment.Center;
            AddButton("Start");
            AddButton("Options");
            AddButton("Exit");
            var res = Settings.Default.Resolution;

            Buttons.Position = new Vector2f((res.X - Buttons.GetBounds().Width) / 2, (res.Y - Buttons.GetBounds().Height) / 2);
        }