Exemple #1
0
        protected virtual void SelectButton(int no)
        {
            // unselect current button
            DisplayObject  button = Buttons[CurrentSelection];
            RectangleShape back   = (RectangleShape)button.GetChildAt(0);

            back.FillColor    = new Color(0, 0, 0, 150);
            back.OutlineColor = new Color(0, 0, 0, 0);

            // select button
            while (Buttons[no] == null)
            {
                no = no == ButtonNames.Count - 1 ? 0 : no + 1;
            }

            button            = Buttons[no];
            back              = (RectangleShape)button.GetChildAt(0);
            back.FillColor    = new Color(255, 255, 255, 20);
            back.OutlineColor = new Color(255, 255, 255, 180);

            CurrentSelection = no;
        }