Esempio n. 1
0
        private void AddButton(int index, string text, Action <string> buttonClicked)
        {
            SetGlyph(10 + (index * 11), trailerPosition, 203, Color.DarkCyan);
            controlsConsole.SetGlyph(10 + (index * 11), 0, 186, Color.DarkCyan);
            borderSurface.SetGlyph(11 + (index * 11), trailerPosition + 3, 202, Color.DarkCyan);
            var txt    = text;
            var button = new MogwaiButton(8, 1);

            button.Position = new Point(1 + (index * 11), 0);
            button.Text     = txt;
            button.Click   += (btn, args) =>
            {
                buttonClicked(((Button)btn).Text);
            };
            controlsConsole.Add(button);
        }