Exemplo n.º 1
0
        void _InitMenu()
        {
            _Ui_Menu = new Menu(this, 0, 0, _Size_WidthForm, _Size_HeightMenu, Tetris.Menu.BorderPos.Bottom);
            _Ui_Menu.AddTitle(_Color_Main, Nickname);

            _Ui_Menu.AddBtnRight(
                () => CloseApp(),
                _Color_Main, Color.Transparent, Color.FromArgb(255, 180, 0, 0), "[ q ]"
                );

            _Ui_Menu.AddBtnLeft(
                () => _SaveScoreboard(),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "Save scoreboard"
                );
            _Ui_Menu.AddBtnLeft(
                () => _ReadScoreboard(),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "Load scoreboard"
                );
            _Ui_Menu.AddBtnLeft(
                () => _Ui_Scoreboard.RemoveItem(Nickname),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "Remove scores of your nick"
                );
            _Ui_Menu.AddBtnLeft(
                () => _ChangeNickname(),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "Rename"
                );
        }
Exemplo n.º 2
0
        void _InitBottomMenu()
        {
            _Ui_BottomMenu = new Menu(
                this,
                0,
                _Size_HeightMenu + 10 + _Ui_Scoreboard.Height + 10,
                _Size_WidthForm,
                _Size_HeightMenu,
                Tetris.Menu.BorderPos.Top
                );

            // _Ui_BottomMenu.AddRadioRight(
            //   () => _ToggleMusic(),
            //   true, _Color_Main, Color.Transparent, _Color_ButtonHover, "Muzyka"
            // );
            _Ui_BottomMenu.AddBtnRight(
                () => _ToggleMusic(),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "Toggle music"
                );

            _Ui_BottomMenu.AddBtnLeft(
                () => Play(10, 20, 500),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "Standard game"
                );
            _Ui_BottomMenu.AddBtnLeft(
                () => Play(10, 10, 1000),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "The square"
                );
            _Ui_BottomMenu.AddBtnLeft(
                () => Play(30, 10, 1000),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "Fat fun"
                );
            _Ui_BottomMenu.AddBtnLeft(
                () => Play(15, 25, 100),
                _Color_Main, Color.Transparent, _Color_ButtonHover, "No time"
                );
        }