Example #1
0
        private void PrintPadButtonKeySetting(bool キー設定Flag, int padButtonIndex, string title, DDInput.Button button)
        {
            int y = 230 + padButtonIndex * 90;

            string setting;

            if (キー設定Flag)
            {
                setting = string.Join(" , ", button.KeyIds.Select(keyId => DDSimpleMenu.GetKeyName(keyId)));
            }
            else
            {
                setting = string.Join(" , ", button.BtnIds.Select(btnId => DDSimpleMenu.GetPadButtonName(btnId)));
            }

            this.DrawButton(300, y + 25, Ground.I.Picture.SettingButton_変更, true);

            if (this.LastButtonHoveringFlag && DDMouse.L.GetInput() == -1)
            {
                InputPadButtonKeySetting(キー設定Flag, title, button);
            }

            DDFontUtils.DrawString(
                550,
                y,
                "「" + title + "」 = " + setting,
                DDFontUtils.GetFont("Kゴシック", 50),
                false,
                キー設定Flag ? new I3Color(192, 255, 128) : new I3Color(255, 192, 128),
                キー設定Flag ? new I3Color(50, 100, 0) : new I3Color(100, 50, 0)
                );
        }
Example #2
0
        private void PrintPadButtonKeySetting(bool キー設定Flag, int padButtonIndex, string title, DDInput.Button button)
        {
            int y = 230 + padButtonIndex * 90;

            Func <DDInput.Button, string> getSetting;

            {
                Func <string, string> w = s => Common.FirstNotEmpty(s, "割り当てナシ");

                if (キー設定Flag)
                {
                    getSetting = btn => w(string.Join(" , ", btn.KeyIds.Select(keyId => DDSimpleMenu.GetKeyName(keyId))));
                }
                else
                {
                    getSetting = btn => w(string.Join(" , ", btn.BtnIds.Select(btnId => DDSimpleMenu.GetPadButtonName(btnId))));
                }
            }

            this.DrawButton(300, y + 25, Ground.I.Picture.SettingButton_変更, true);

            if (this.LastButtonHoveringFlag && DDMouse.L.GetInput() == -1)
            {
                InputPadButtonKeySetting(キー設定Flag, title, button, getSetting);
            }

            DDFontUtils.DrawString(
                550,
                y,
                "「" + title + "」 = " + getSetting(button),
                DDFontUtils.GetFont("Kゴシック", 50),
                false,
                キー設定Flag ? new I3Color(192, 255, 128) : new I3Color(255, 192, 128),
                キー設定Flag ? new I3Color(50, 100, 0) : new I3Color(100, 50, 0)
                );
        }