Beispiel #1
0
        private void 基本設定()
        {
            DDSE[] seSamples = new DDSE[]
            {
                Ground.I.SE.Poka01,
                Ground.I.SE.Poka02,
            };

            DDEngine.FreezeInput();

            for (; ;)
            {
                // ====
                // 入力判定ここから
                // ====

                if (
                    DDInput.A.GetInput() == 1 ||
                    DDInput.B.GetInput() == 1 ||
                    DDMouse.R.GetInput() == -1
                    )
                {
                    this.Mode = Mode_e.END;
                    break;
                }

                if (DDMouse.L.GetInput() == -1)
                {
                    if (this.GetTabTitleCrash_拡張設定().IsCrashed(DDCrashUtils.Point(new D2Point(DDMouse.X, DDMouse.Y))))
                    {
                        this.Mode = Mode_e.拡張設定;
                        break;
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_フルスクリーン)
                    {
                        DDMain.SetFullScreen();
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_ウィンドウ)
                    {
                        const int def_screen_w = DDConsts.Screen_W / 2;
                        const int def_screen_h = DDConsts.Screen_H / 2;

                        DDMain.SetScreenSize(def_screen_w, def_screen_h);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_デフォルトに戻す)
                    {
                        this.デフォルトに戻す();
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_戻る)
                    {
                        this.Mode = Mode_e.END;
                        break;
                    }
                }

                // ====
                // 入力判定ここまで
                // ====

                // ====
                // 描画ここから
                // ====

                this.BeforeDrawContents();

                DDDraw.DrawSimple(Ground.I.Picture.基本設定枠, 0, 0);

                this.DrawTabTitles(false);

                this.DrawPrompt(100, 250, "画面モード");
                this.DrawPrompt(100, 380, "BGM音量");
                this.DrawPrompt(100, 510, "SE音量");
                this.DrawPrompt(100, 640, "メッセージ表示速度");
                this.DrawPrompt(100, 770, "メッセージウィンドウ透明度");

                bool fullScreenFlag =
                    DDGround.RealScreen_W == DDGround.MonitorRect.W &&
                    DDGround.RealScreen_H == DDGround.MonitorRect.H;

                this.DrawButton(1100, 280, Ground.I.Picture.SettingButton_フルスクリーン, fullScreenFlag);
                this.DrawButton(1550, 280, Ground.I.Picture.SettingButton_ウィンドウ, !fullScreenFlag);
                this.DrawTrackBar(1325, 410, "小", "大", DDGround.MusicVolume, volume =>
                {
                    DDGround.MusicVolume = volume;
                    DDMusicUtils.UpdateVolume();
                });
                this.DrawTrackBar(1325, 540, "小", "大", DDGround.SEVolume, volume =>
                {
                    DDGround.SEVolume = volume;
                    //DDSEUtils.UpdateVolume(); // v_20210215 -- メソッド終了時に全て更新する。

                    foreach (DDSE se in seSamples)
                    {
                        se.UpdateVolume();
                    }
                },
                                  () =>
                {
                    DDUtils.Random.ChooseOne(seSamples).Play();
                });
                this.DrawTrackBar(1325, 670, "遅い", "速い",
                                  DDUtils.RateAToB(GameConsts.MESSAGE_SPEED_MIN, GameConsts.MESSAGE_SPEED_MAX, Ground.I.MessageSpeed),
                                  value => Ground.I.MessageSpeed = SCommon.ToInt(
                                      DDUtils.AToBRate(GameConsts.MESSAGE_SPEED_MIN, GameConsts.MESSAGE_SPEED_MAX, value)
                                      )
                                  );
                this.DrawTrackBar(1325, 800, "透明", "不透明",
                                  DDUtils.RateAToB(0, 100, Ground.I.MessageWindow_A_Pct),
                                  value => Ground.I.MessageWindow_A_Pct = SCommon.ToInt(
                                      DDUtils.AToBRate(0, 100, value)
                                      )
                                  );

                this.DrawUnderButtons();

                // ====
                // 描画ここまで
                // ====

                DDEngine.EachFrame();
            }
            DDEngine.FreezeInput();

            DDSEUtils.UpdateVolume();             // v_20210215
        }
Beispiel #2
0
        private void 画面サイズ設定()
        {
            DDEngine.FreezeInput();

            for (; ;)
            {
                // ====
                // 入力判定ここから
                // ====

                if (
                    DDInput.A.GetInput() == 1 ||
                    DDInput.B.GetInput() == 1 ||
                    DDMouse.R.GetInput() == -1
                    )
                {
                    this.Mode = Mode_e.拡張設定;
                    break;
                }

                if (DDMouse.L.GetInput() == -1)
                {
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_960x540)
                    {
                        DDMain.SetScreenSize(960, 540);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1080x607)
                    {
                        DDMain.SetScreenSize(1080, 607);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1200x675)
                    {
                        DDMain.SetScreenSize(1200, 675);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1320x742)
                    {
                        DDMain.SetScreenSize(1320, 742);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1440x810)
                    {
                        DDMain.SetScreenSize(1440, 810);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1560x877)
                    {
                        DDMain.SetScreenSize(1560, 877);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1680x945)
                    {
                        DDMain.SetScreenSize(1680, 945);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1800x1012)
                    {
                        DDMain.SetScreenSize(1800, 1012);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_1920x1080)
                    {
                        DDMain.SetScreenSize(1920, 1080);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_2040x1147)
                    {
                        DDMain.SetScreenSize(2040, 1147);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_2160x1215)
                    {
                        DDMain.SetScreenSize(2160, 1215);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_2280x1282)
                    {
                        DDMain.SetScreenSize(2280, 1282);
                    }

                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_フルスクリーン画面に合わせる)
                    {
                        DDMain.SetScreenSize(DDGround.MonitorRect.W, DDGround.MonitorRect.H);
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_フルスクリーン縦横比を維持する)
                    {
                        DDMain.SetFullScreen();
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_デフォルトに戻す)
                    {
                        this.デフォルトに戻す();
                    }
                    if (this.LastHoveringButton == Ground.I.Picture.SettingButton_戻る)
                    {
                        this.Mode = Mode_e.拡張設定;
                        break;
                    }
                }

                // ====
                // 入力判定ここまで
                // ====

                // ====
                // 描画ここから
                // ====

                this.BeforeDrawContents();

                DDDraw.DrawSimple(Ground.I.Picture.詳細設定枠, 0, 0);

                DrawTabTitle(610, 70, "ウィンドウサイズ設定", true);

                this.DrawButton(300, 300, Ground.I.Picture.SettingButton_960x540, true);
                this.DrawButton(740, 300, Ground.I.Picture.SettingButton_1080x607, true);
                this.DrawButton(1180, 300, Ground.I.Picture.SettingButton_1200x675, true);
                this.DrawButton(1620, 300, Ground.I.Picture.SettingButton_1320x742, true);

                this.DrawButton(300, 420, Ground.I.Picture.SettingButton_1440x810, true);
                this.DrawButton(740, 420, Ground.I.Picture.SettingButton_1560x877, true);
                this.DrawButton(1180, 420, Ground.I.Picture.SettingButton_1680x945, true);
                this.DrawButton(1620, 420, Ground.I.Picture.SettingButton_1800x1012, true);

                this.DrawButton(300, 540, Ground.I.Picture.SettingButton_1920x1080, true);
                this.DrawButton(740, 540, Ground.I.Picture.SettingButton_2040x1147, true);
                this.DrawButton(1180, 540, Ground.I.Picture.SettingButton_2160x1215, true);
                this.DrawButton(1620, 540, Ground.I.Picture.SettingButton_2280x1282, true);

                this.DrawButton(960, 660, Ground.I.Picture.SettingButton_フルスクリーン画面に合わせる, true);
                this.DrawButton(960, 780, Ground.I.Picture.SettingButton_フルスクリーン縦横比を維持する, true);

                this.DrawUnderButtons();

                // ====
                // 描画ここまで
                // ====

                DDEngine.EachFrame();
            }
            DDEngine.FreezeInput();
        }