private void デフォルトに戻す() { { 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); } DDGround.MusicVolume = 0.45; DDGround.SEVolume = 0.45; Ground.I.MessageSpeed = GameConsts.MESSAGE_SPEED_DEF; Ground.I.MessageWindow_A_Pct = GameConsts.MESSAGE_WINDOW_A_PCT_DEF; // 設定値変更を反映 DDMusicUtils.UpdateVolume(); DDSEUtils.UpdateVolume(); // ボタン設定 { DDInput.DIR_2.BtnIds = new int[] { 0 }; DDInput.DIR_4.BtnIds = new int[] { 1 }; DDInput.DIR_6.BtnIds = new int[] { 2 }; DDInput.DIR_8.BtnIds = new int[] { 3 }; DDInput.A.BtnIds = new int[] { 4 }; DDInput.B.BtnIds = new int[] { 7 }; DDInput.L.BtnIds = new int[] { 10 }; } // キー設定 { DDInput.DIR_2.KeyIds = new int[] { DX.KEY_INPUT_DOWN }; DDInput.DIR_4.KeyIds = new int[] { DX.KEY_INPUT_LEFT }; DDInput.DIR_6.KeyIds = new int[] { DX.KEY_INPUT_RIGHT }; DDInput.DIR_8.KeyIds = new int[] { DX.KEY_INPUT_UP }; DDInput.A.KeyIds = new int[] { DX.KEY_INPUT_RETURN }; DDInput.B.KeyIds = new int[] { DX.KEY_INPUT_DELETE }; DDInput.L.KeyIds = new int[] { DX.KEY_INPUT_LCONTROL, DX.KEY_INPUT_RCONTROL }; } }
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 }
private void Setting() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); string[] items = new string[] { "ゲームパッドのボタン設定", "キーボードのキー設定", "ウィンドウサイズ変更", "BGM音量", "SE音量", "スナップショット・ストック数", "戻る", }; DDSE[] seSamples = new DDSE[] { Ground.I.SE.Dummy, // TODO }; int selectIndex = 0; for (; ;) { selectIndex = this.SimpleMenu.Perform("設定", items, selectIndex, false, 282, 48, 60); switch (selectIndex) { case 0: this.SimpleMenu.PadConfig(); break; case 1: this.SimpleMenu.PadConfig(true); break; case 2: this.SimpleMenu.WindowSizeConfig(); break; case 3: this.SimpleMenu.VolumeConfig("BGM音量", DDGround.MusicVolume, 0, 100, 1, 10, volume => { DDGround.MusicVolume = volume; DDMusicUtils.UpdateVolume(); }, () => { } ); break; case 4: this.SimpleMenu.VolumeConfig("SE音量", DDGround.SEVolume, 0, 100, 1, 10, volume => { DDGround.SEVolume = volume; //DDSEUtils.UpdateVolume(); // old foreach (DDSE se in seSamples) // サンプルのみ音量更新 { se.UpdateVolume(); } }, () => { DDUtils.Random.ChooseOne(seSamples).Play(); } ); DDSEUtils.UpdateVolume(); // 全音量更新 break; case 5: this.Setting_SnapshotCountMax(); break; case 6: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); }
private void Setting() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); string[] items = new string[] { "パッドのボタン設定", "ウィンドウサイズ変更", "BGM音量", "SE音量", "戻る", }; int selectIndex = 0; for (; ;) { selectIndex = this.SimpleMenu.Perform("設定", items, selectIndex); switch (selectIndex) { case 0: this.SimpleMenu.PadConfig(); break; case 1: this.SimpleMenu.WindowSizeConfig(); break; case 2: this.SimpleMenu.VolumeConfig("BGM音量", DDGround.MusicVolume, 0, 100, 1, 10, volume => { DDGround.MusicVolume = volume; DDMusicUtils.UpdateVolume(); }, () => { } ); break; case 3: this.SimpleMenu.VolumeConfig("SE音量", DDGround.SEVolume, 0, 100, 1, 10, volume => { DDGround.SEVolume = volume; DDSEUtils.UpdateVolume(); }, () => { //Ground.I.SE.PauseIn.Play(); } ); break; case 4: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); }
private void Setting() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); string[] items = new string[] { "ゲームパッドのボタン設定", "キーボードのキー設定", "ウィンドウサイズ変更", "BGM音量", "SE音量", "ノベルパートのメッセージ表示速度", "戻る", }; DDSE[] seSamples = Ground.I.SE.テスト用s; int selectIndex = 0; for (; ;) { selectIndex = this.SimpleMenu.Perform("設定", items, selectIndex); switch (selectIndex) { case 0: this.SimpleMenu.PadConfig(); break; case 1: this.SimpleMenu.PadConfig(true); break; case 2: this.SimpleMenu.WindowSizeConfig(); break; case 3: this.SimpleMenu.VolumeConfig("BGM音量", DDGround.MusicVolume, 0, 100, 1, 10, volume => { DDGround.MusicVolume = volume; DDMusicUtils.UpdateVolume(); }, () => { } ); break; case 4: this.SimpleMenu.VolumeConfig("SE音量", DDGround.SEVolume, 0, 100, 1, 10, volume => { DDGround.SEVolume = volume; //DDSEUtils.UpdateVolume(); // old foreach (DDSE se in seSamples) // サンプルのみ音量更新 { se.UpdateVolume(); } }, () => { DDUtils.Random.ChooseOne(seSamples).Play(); } ); DDSEUtils.UpdateVolume(); // 全音量更新 break; case 5: this.SimpleMenu.IntVolumeConfig( "ノベルパートのメッセージ表示速度", Ground.I.NovelMessageSpeed, NovelConsts.MESSAGE_SPEED_MIN, NovelConsts.MESSAGE_SPEED_MAX, 1, 2, speed => Ground.I.NovelMessageSpeed = speed, () => { } ); break; case 6: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); }
public void Perform() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); string[] items = new string[] { "ゲームパッドのボタン設定", "キーボードのキー設定", "ウィンドウサイズ変更", "BGM音量", "SE音量", "戻る", }; DDSE[] seSamples = Ground.I.SE.テスト用s; int selectIndex = 0; for (; ;) { selectIndex = this.SimpleMenu.Perform(40, 40, 40, 24, "設定", items, selectIndex); switch (selectIndex) { case 0: this.SimpleMenu.PadConfig(); break; case 1: this.SimpleMenu.PadConfig(true); break; case 2: this.SimpleMenu.WindowSizeConfig(); break; case 3: this.SimpleMenu.VolumeConfig("BGM音量", DDGround.MusicVolume, 0, 100, 1, 10, volume => { DDGround.MusicVolume = volume; DDMusicUtils.UpdateVolume(); }, () => { } ); break; case 4: this.SimpleMenu.VolumeConfig("SE音量", DDGround.SEVolume, 0, 100, 1, 10, volume => { DDGround.SEVolume = volume; //DDSEUtils.UpdateVolume(); // old foreach (DDSE se in seSamples) // サンプルのみ音量更新 { se.UpdateVolume(); } }, () => { DDUtils.Random.ChooseOne(seSamples).Play(); } ); DDSEUtils.UpdateVolume(); // 全音量更新 break; case 5: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); }
private void Setting() { //DDCurtain.SetCurtain(); DDEngine.FreezeInput(); string[] items = new string[] { "ゲームパッドのボタン設定", "ウィンドウサイズ変更", "BGM音量", "SE音量", "戻る", }; int selectIndex = 0; for (; ;) { selectIndex = this.SimpleMenu.Perform("設定", items, selectIndex); switch (selectIndex) { case 0: this.SimpleMenu.PadConfig(); break; case 1: this.SimpleMenu.WindowSizeConfig(); break; case 2: this.SimpleMenu.VolumeConfig("BGM音量", DDGround.MusicVolume, 0, 100, 1, 10, volume => { DDGround.MusicVolume = volume; DDMusicUtils.UpdateVolume(); }, () => { } ); break; case 3: this.SimpleMenu.VolumeConfig("SE音量", DDGround.SEVolume, 0, 100, 1, 10, volume => { DDGround.SEVolume = volume; DDSEUtils.UpdateVolume(); }, () => { SecurityTools.CRandom.ChooseOne(new DDSE[] { Ground.I.SE.PauseEnter, Ground.I.SE.PauseLeave, Ground.I.SE.Restart, Ground.I.SE.ReturnToTitle, Ground.I.SE.Poka, }) .Play(); } ); break; case 4: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); }
private void Setting() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); string[] items = new string[] { "パッドのボタン設定", "ウィンドウサイズ変更", "BGM音量", "SE音量", "ゲーム画面上でのマウスカーソルの表示/非表示の切り替え", "戻る", }; int selectIndex = 0; for (; ;) { selectIndex = this.SimpleMenu.Perform("設定", items, selectIndex); switch (selectIndex) { case 0: this.SimpleMenu.PadConfig(); break; case 1: this.SimpleMenu.WindowSizeConfig(); break; case 2: this.SimpleMenu.VolumeConfig("BGM音量", DDGround.MusicVolume, 0, 100, 1, 10, volume => { DDGround.MusicVolume = volume; DDMusicUtils.UpdateVolume(); }, () => { } ); break; case 3: this.SimpleMenu.VolumeConfig("SE音量", DDGround.SEVolume, 0, 100, 1, 10, volume => { DDGround.SEVolume = volume; DDSEUtils.UpdateVolume(); }, () => { /* * if (SecurityTools.CRandom.GetReal2() < 0.5) * Ground.I.SE.PauseIn.Play(); * else * Ground.I.SE.PauseOut.Play(); */ } ); break; case 4: DDGround.RO_MouseDispMode = DDGround.RO_MouseDispMode == false; DDUtils.SetMouseDispMode(DDGround.RO_MouseDispMode); break; case 5: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); }
private void Setting() { this.WallDrawer.TargetCurtain_W = 600; DDCurtain.SetCurtain(); DDEngine.FreezeInput(); int selectIndex = 0; for (; ;) { string[] items = new string[] { "ゲームパッドのボタン設定", "キーボードのキー設定", "ウィンドウサイズ変更", "BGM音量", "SE音量", "自弾の動きに合わせて背景が歪む効果 [ 現在の設定:" + (Ground.I.自弾背景歪み ? "有効" : "無効") + " ]", "戻る", }; selectIndex = this.SimpleMenu.Perform("設定", items, selectIndex); switch (selectIndex) { case 0: this.SimpleMenu.PadConfig(); break; case 1: this.SimpleMenu.PadConfig(true); break; case 2: this.SimpleMenu.WindowSizeConfig(); break; case 3: this.SimpleMenu.VolumeConfig("BGM音量", DDGround.MusicVolume, 0, 100, 1, 10, volume => { DDGround.MusicVolume = volume; DDMusicUtils.UpdateVolume(); }, () => { } ); break; case 4: this.SimpleMenu.VolumeConfig("SE音量", DDGround.SEVolume, 0, 100, 1, 10, volume => { DDGround.SEVolume = volume; DDSEUtils.UpdateVolume(); }, () => { Ground.I.SE.SE_ITEMGOT.Play(); } ); break; case 5: Ground.I.自弾背景歪み ^= true; break; case 6: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); this.WallDrawer.TargetCurtain_W = WallDrawerTask.CURTAIN_W_DEF; // restore }