Пример #1
0
        protected void AddButton(string text, Colour4 colour, Action action)
        {
            var button = new Button
            {
                Text         = text,
                ButtonColour = colour,
                Origin       = Anchor.TopCentre,
                Anchor       = Anchor.TopCentre,
                Height       = button_height,
                Action       = delegate
                {
                    action?.Invoke();
                    Hide();
                }
            };

            InternalButtons.Add(button);
        }