@if exp="typeof(global.config_object) == 'undefined'" @iscript class ConfigLayer2 extends Layer // 設定画面レイヤ2 { var ConfigButtons = new Array(); // コンフィグのボタン群 var owner; // ConfigPlugin オブジェクトへの参照 function ConfigLayer2(win, par, owner) { super.Layer(win, par); this.owner = owner; // レイヤの状態を初期化 loadImages("cfg_bg2"); setSizeToImageSize(); setPos(0, 0); hitType = htMask; hitThreshold = 0; //全域不透過(当たり判定ばりばり) focusable=false; visible=false; makeMainMenu(); } function finalize() { clear(); //コンフィグのボタン郡をまとめて無効化 for(var i = 0; i < ConfigButtons.count; i++) invalidate ConfigButtons[i]; super.finalize(...); } //コンフィグのボタンをまとめて作成。 function makeMainMenu() { var obj; // ボタン0(右クリックのプルダウンメニュー) ConfigButtons.add(obj = new PullDownMenu(window, this, "cfg_pulldown", 250, sf.rclickmode, onRClickSetting)); obj.setPos(85, 150); // ボタン1(スペースキーのプルダウンメニュー) ConfigButtons.add(obj = new PullDownMenu(window, this, "cfg_pulldown", 250, sf.spacekeymode, onSpaceKeySetting)); obj.setPos(442, 150); // ボタン2 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.haru_chcolor_r = (int)obj.position; parent.haruCh();}, 140,"cfg_tab_r")); obj.setPos(183, 259); obj.max=255; obj.min=0; obj.position=sf.haru_chcolor_r; obj.focusFunc = obj.enterFunc = haruImg; obj.hint="Changes the red tint in Haru's text"; // ボタン3 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.haru_chcolor_g = (int)obj.position; parent.haruCh();}, 140,"cfg_tab_g")); obj.setPos(344, 259); obj.max=255; obj.min=0; obj.position=sf.haru_chcolor_g; obj.focusFunc = obj.enterFunc = haruImg; obj.hint="Changes the green tint in Haru's text"; // ボタン4 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.haru_chcolor_b = (int)obj.position; parent.haruCh();}, 140,"cfg_tab_b")); obj.setPos(504, 259); obj.max=255; obj.min=0; obj.position=sf.haru_chcolor_b; obj.focusFunc = obj.enterFunc = haruImg; obj.hint="Changes the blue tint in Haru's text"; // ボタン5 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, haruChDef)); obj.setPos(647, 262); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = haruImg; obj.hint="Revert to default"; // ボタン6 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.kanon_chcolor_r = (int)obj.position; parent.kanonCh();}, 140,"cfg_tab_r")); obj.setPos(183, 300); obj.max=255; obj.min=0; obj.position=sf.kanon_chcolor_r; obj.focusFunc = obj.enterFunc = kanonImg; obj.hint="Changes the red tint in Kanon's text"; // ボタン7 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.kanon_chcolor_g = (int)obj.position; parent.kanonCh();}, 140,"cfg_tab_g")); obj.setPos(344, 300); obj.max=255; obj.min=0; obj.position=sf.kanon_chcolor_g; obj.focusFunc = obj.enterFunc = kanonImg; obj.hint="Changes the green tint in Kanon's text"; // ボタン8 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.kanon_chcolor_b = (int)obj.position; parent.kanonCh();}, 140,"cfg_tab_b")); obj.setPos(504, 300); obj.max=255; obj.min=0; obj.position=sf.kanon_chcolor_b; obj.focusFunc = obj.enterFunc = kanonImg; obj.hint="Changes the blue tint in Kanon's text"; // ボタン9 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, kanonChDef)); obj.setPos(647, 303); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = kanonImg; obj.hint="Revert to default"; // ボタン10 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.tubaki_chcolor_r = (int)obj.position; parent.tubakiCh();}, 140,"cfg_tab_r")); obj.setPos(183, 341); obj.max=255; obj.min=0; obj.position=sf.tubaki_chcolor_r; obj.focusFunc = obj.enterFunc = tubakiImg; obj.hint="Changes the red tint in Tsubaki's text"; // ボタン11 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.tubaki_chcolor_g = (int)obj.position; parent.tubakiCh();}, 140,"cfg_tab_g")); obj.setPos(344, 341); obj.max=255; obj.min=0; obj.position=sf.tubaki_chcolor_g; obj.focusFunc = obj.enterFunc = tubakiImg; obj.hint="Changes the green tint in Tsubaki's text"; // ボタン12 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.tubaki_chcolor_b = (int)obj.position; parent.tubakiCh();}, 140,"cfg_tab_b")); obj.setPos(504, 341); obj.max=255; obj.min=0; obj.position=sf.tubaki_chcolor_b; obj.focusFunc = obj.enterFunc = tubakiImg; obj.hint="Changes the blue tint in Tsubaki's text"; // ボタン13 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, tubakiChDef)); obj.setPos(647, 344); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = tubakiImg; obj.hint="Revert to default"; // ボタン14 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.mizuha_chcolor_r = (int)obj.position; parent.mizuhaCh();}, 140,"cfg_tab_r")); obj.setPos(183, 382); obj.max=255; obj.min=0; obj.position=sf.mizuha_chcolor_r; obj.focusFunc = obj.enterFunc = mizuhaImg; obj.hint="Changes the red tint in Mizuha's text"; // ボタン15 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.mizuha_chcolor_g = (int)obj.position; parent.mizuhaCh();}, 140,"cfg_tab_g")); obj.setPos(344, 382); obj.max=255; obj.min=0; obj.position=sf.mizuha_chcolor_g; obj.focusFunc = obj.enterFunc = mizuhaImg; obj.hint="Changes the green tint in Mizuha's text"; // ボタン16 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.mizuha_chcolor_b = (int)obj.position; parent.mizuhaCh();}, 140,"cfg_tab_b")); obj.setPos(504, 382); obj.max=255; obj.min=0; obj.position=sf.mizuha_chcolor_b; obj.focusFunc = obj.enterFunc = mizuhaImg; obj.hint="Changes the blue tint in Mizuha's text"; // ボタン17 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, mizuhaChDef)); obj.setPos(647, 385); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = mizuhaImg; obj.hint="Revert to default"; // ボタン18 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.gonzo_chcolor_r = (int)obj.position; parent.gonzoCh();}, 140,"cfg_tab_r")); obj.setPos(183, 423); obj.max=255; obj.min=0; obj.position=sf.gonzo_chcolor_r; obj.focusFunc = obj.enterFunc = gonzoImg; obj.hint="Changes the red tint in Gonzou's text"; // ボタン19 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.gonzo_chcolor_g = (int)obj.position; parent.gonzoCh();}, 140,"cfg_tab_g")); obj.setPos(344, 423); obj.max=255; obj.min=0; obj.position=sf.gonzo_chcolor_g; obj.focusFunc = obj.enterFunc = gonzoImg; obj.hint="Changes the green tint in Gonzou's text"; // ボタン20 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.gonzo_chcolor_b = (int)obj.position; parent.gonzoCh();}, 140,"cfg_tab_b")); obj.setPos(504, 423); obj.max=255; obj.min=0; obj.position=sf.gonzo_chcolor_b; obj.focusFunc = obj.enterFunc = gonzoImg; obj.hint="Changes the blue tint in Gonzou's text"; // ボタン21 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, gonzoChDef)); obj.setPos(647, 426); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = gonzoImg; obj.hint="Revert to default"; // ボタン22 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.yuki_chcolor_r = (int)obj.position; parent.yukiCh();}, 140,"cfg_tab_r")); obj.setPos(183, 464); obj.max=255; obj.min=0; obj.position=sf.yuki_chcolor_r; obj.focusFunc = obj.enterFunc = yukiImg; obj.hint="Changes the red tint in Yuki's text"; // ボタン23 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.yuki_chcolor_g = (int)obj.position; parent.yukiCh();}, 140,"cfg_tab_g")); obj.setPos(344, 464); obj.max=255; obj.min=0; obj.position=sf.yuki_chcolor_g; obj.focusFunc = obj.enterFunc = yukiImg; obj.hint="Changes the green tint in Yuki's text"; // ボタン24 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.yuki_chcolor_b = (int)obj.position; parent.yukiCh();}, 140,"cfg_tab_b")); obj.setPos(504, 464); obj.max=255; obj.min=0; obj.position=sf.yuki_chcolor_b; obj.focusFunc = obj.enterFunc = yukiImg; obj.hint="Changes the blue tint in Yuki's text"; // ボタン25 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, yukiChDef)); obj.setPos(647, 467); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = yukiImg; obj.hint="Revert to default"; // ボタン26 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.eiiti_chcolor_r = (int)obj.position; parent.eiitiCh();}, 140,"cfg_tab_r")); obj.setPos(183, 505); obj.max=255; obj.min=0; obj.position=sf.eiiti_chcolor_r; obj.focusFunc = obj.enterFunc = eiitiImg; obj.hint="Changes the red tint in Eiichi's text"; // ボタン27 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.eiiti_chcolor_g = (int)obj.position; parent.eiitiCh();}, 140,"cfg_tab_g")); obj.setPos(344, 505); obj.max=255; obj.min=0; obj.position=sf.eiiti_chcolor_g; obj.focusFunc = obj.enterFunc = eiitiImg; obj.hint="Changes the green tint in Eiichi's text"; // ボタン28 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.eiiti_chcolor_b = (int)obj.position; parent.eiitiCh();}, 140,"cfg_tab_b")); obj.setPos(504, 505); obj.max=255; obj.min=0; obj.position=sf.eiiti_chcolor_b; obj.focusFunc = obj.enterFunc = eiitiImg; obj.hint="Changes the blue tint in Eiichi's text"; // ボタン29 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, eiitiChDef)); obj.setPos(647, 508); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = eiitiImg; obj.hint="Revert to default"; // ボタン30 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.other_chcolor_r = (int)obj.position; parent.otherCh();}, 140,"cfg_tab_r")); obj.setPos(183, 546); obj.max=255; obj.min=0; obj.position=sf.other_chcolor_r; obj.focusFunc = obj.enterFunc = otherImg; obj.hint="Changes the red tint for Misc text"; // ボタン31 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.other_chcolor_g = (int)obj.position; parent.otherCh();}, 140,"cfg_tab_g")); obj.setPos(344, 546); obj.max=255; obj.min=0; obj.position=sf.other_chcolor_g; obj.focusFunc = obj.enterFunc = otherImg; obj.hint="Changes the green tint for Misc text"; // ボタン32 ConfigButtons.add(obj = new SliderLayer(window, this, function(obj){sf.other_chcolor_b = (int)obj.position; parent.otherCh();}, 140,"cfg_tab_b")); obj.setPos(504, 546); obj.max=255; obj.min=0; obj.position=sf.other_chcolor_b; obj.focusFunc = obj.enterFunc = otherImg; obj.hint="Changes the blue tint for Misc text"; // ボタン33 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, otherChDef)); obj.setPos(647, 549); obj.loadImages("cfg_color_default"); obj.focusFunc = obj.enterFunc = otherImg; obj.hint="Revert to default"; //ボタン 34(バックボタン) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onBackButton)); obj.setPos(198, 10); obj.loadImages("cfg_exit"); obj.hint="Return to previous screen"; //ボタン 35(タイトルに戻る) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onTitleBackButton)); obj.setPos(330, 10); obj.loadImages("cfg_backtitle"); obj.hint="Return to Title"; // ボタン36(デフォルトに戻す) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onDefaultButton)); obj.setPos(462,10); obj.loadImages("cfg_default"); obj.hint="Revert all settings to default"; //ボタン 37(ゲーム終了) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onExitButton)); obj.setPos(632, 10); obj.loadImages("cfg_exitgame"); obj.hint="Quit the game"; // ボタン38 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, function(){kag.process("","*page1");})); obj.setPos(738, 67); obj.loadImages("cfg_1page"); obj.hint="Open first page"; // ボタン39 ConfigButtons.add(obj = new global.Layer(window, this)); obj.setPos(739, 218); obj.loadImages("cfg_2page"); obj.setSizeToImageSize(); obj.width = obj.imageWidth\3; obj.hint="Open second page"; obj.visible=true; // ボタン40 ConfigButtons.add(obj = new global.Layer(window, this)); obj.setPos(491,208); obj.loadImages("cfg_face_haru"); obj.setSizeToImageSize(); obj.hitThreshold = 256; obj.visible=false; // ボタンいっぱい・色付き文字表示レイヤー生成 for(var i=0; i<8; i++){ ConfigButtons.add(obj = new global.Layer(window, this)); obj.setPos(15, 257+(i*41)); obj.setImageSize(150, 24); obj.setSizeToImageSize(); // obj.font.face = "MS ゴシック"; // Localized --Skyward obj.font.face = "MS Gothic"; obj.font.height = 21; obj.visible=true; } // 文字を全キャラ描画 haruCh(); kanonCh(); tubakiCh(); mizuhaCh(); gonzoCh(); yukiCh(); eiitiCh(); otherCh(); // プルダウンメニューのオーダーを上げる for(var i=0; i= 0; i--) ConfigButtons[i].visible = false; } function onKeyDown(key) { // ESC キーが押されたらレイヤを隠す if(key == VK_ESCAPE)owner.onConfigClose(); else super.onKeyDown(...); } function onMouseDown(x, y, button, shift) { if(button == mbRight)owner.onConfigClose(); return; } } //------------------------------------------------------ class ConfigLayer extends Layer // 設定画面レイヤ { var ConfigButtons = new Array(); // コンフィグのボタン群 var owner; // ConfigPlugin オブジェクトへの参照 function ConfigLayer(win, par, owner) { super.Layer(win, par); this.owner = owner; // レイヤの状態を初期化 loadImages("cfg_bg"); setSizeToImageSize(); setPos(0, 0); hitType = htMask; hitThreshold = 0; //全域不透過(当たり判定ばりばり) focusable=false; visible=false; makeMainMenu(); } function finalize() { clear(); //コンフィグのボタン郡をまとめて無効化 for(var i = 0; i < ConfigButtons.count; i++) invalidate ConfigButtons[i]; super.finalize(...); } //コンフィグのボタンをまとめて作成。 function makeMainMenu() { var obj; //ボタン 0(既読文書の速度) ConfigButtons.add(obj = new SliderLayer(window, this, onAlreadyReadSpeed)); obj.setPos(163, 126); obj.max=60; obj.min=10; obj.position=sf.alreadyreadspeed; obj.hint="Set the display speed of text you've already read"; //ボタン 1(未読文書の速度) ConfigButtons.add(obj = new SliderLayer(window, this, onReadSpeed)); obj.setPos(163, 154); obj.max=60; obj.min=10; obj.position=sf.readspeed; obj.hint="Set the display speed of unread text"; //ボタン 2(オートモードの速度) ConfigButtons.add(obj = new SliderLayer(window, this, onAutoSpeed)); obj.setPos(163, 182); obj.max=3500; obj.min=400; obj.position=sf.autospeed; obj.hint="Set the display speed of Automatic Reading Mode"; //ボタン 3(スキップ:既読のみスキップ) ConfigButtons.add(obj = new CustomCheckBox(window, this, function(){sf.skipopt=true;}, 150)); obj.setPos(49, 221); obj.check=sf.skipopt; obj.hint="Set the skip method: Stop at unread text"; //ボタン 4(スキップ:すべての文章をスキップ) var index = ConfigButtons.add(obj = new CustomCheckBox(window, this, function(){sf.skipopt=false;}, 150)); obj.setPos(241, 221); obj.check=!sf.skipopt; obj.hint="Set the skip method: Stop at decision points"; // お互い自動でチェック状態を入れ替えるように ConfigButtons[index-1].linkObj = ConfigButtons[index]; ConfigButtons[index].linkObj = ConfigButtons[index-1]; //ボタン 5(全体ボリューム) ConfigButtons.add(obj = new SliderLayer(window, this, onGlobalVol)); obj.setPos(459, 123); obj.max=100000; obj.min=0; obj.position=sf.globalvol; obj.hint="Set the master volume"; //ボタン 6(BGMボリューム) ConfigButtons.add(obj = new SliderLayer(window, this, onBgmVol)); obj.setPos(459, 148); obj.max=100; obj.min=20; obj.position=sf.bgmvol; obj.hint="Set the BGM volume"; //ボタン 7(SEボリューム) ConfigButtons.add(obj = new SliderLayer(window, this, onSeVol)); obj.setPos(459, 173); obj.max=100; obj.min=20; obj.position=sf.sevol; obj.hint="Set the sound effect volume"; //ボタン 8(VOICEボリューム) ConfigButtons.add(obj = new SliderLayer(window, this, onVoiceVol)); obj.setPos(459, 197); obj.max=100; obj.min=20; obj.position=sf.vovol; obj.hint="Set the voice volume"; //ボタン 9(SEテスト) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, function(){kag.se[0].play(%[storage:'se_0'+intrandom(1,3) ,loop:false,pan:0]);})); obj.setPos(690, 175); obj.loadImages("cfg_test"); obj.hint="Play a test sound effect"; //ボタン 10(VOICEテスト) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onVoTest)); obj.setPos(690, 201); obj.loadImages("cfg_test"); obj.hint="Play a voice clip"; //ボタン 11(BGM曲名表示) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.showbgmtitle=obj.check;}, "cfg_c_bgmtitle")); obj.setPos(410, 220); obj.check=sf.showbgmtitle; obj.hint="Display the BGM title on screen (Untranslated)"; //ボタン 12(ボイス再生設定:ハル) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.haru_voice=obj.check;}, "cfg_vo_haru")); obj.setPos(32, 296); obj.check=sf.haru_voice; obj.hint="Toggle Haru's voice On/Off"; //ボタン 13(ボイス再生設定:花音) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.kanon_voice=obj.check;}, "cfg_vo_kanon")); obj.setPos(170, 296); obj.check=sf.kanon_voice; obj.hint="Toggle Kanon's voice On/Off"; //ボタン 14(ボイス再生設定:椿姫) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.tubaki_voice=obj.check;}, "cfg_vo_tubaki")); obj.setPos(304, 296); obj.check=sf.tubaki_voice; obj.hint="Toggle Tsubaki's voice On/Off"; //ボタン 15(ボイス再生設定:水羽) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.mizuha_voice=obj.check;}, "cfg_vo_mizuha")); obj.setPos(438, 296); obj.check=sf.mizuha_voice; obj.hint="Toggle Mizuha's voice On/Off"; //ボタン 16(ボイス再生設定:魔王) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.maou_voice=obj.check;}, "cfg_vo_maou")); obj.setPos(583, 273); obj.check=sf.maou_voice; obj.hint="Toggle Maou's voice On/Off"; //ボタン 17(ボイス再生設定:権三) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.gonzo_voice=obj.check;}, "cfg_vo_gonzo")); obj.setPos(583, 301); obj.check=sf.gonzo_voice; obj.hint="Toggle Gonzou's voice On/Off"; //ボタン 18(ボイス再生設定:ユキ) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.yuki_voice=obj.check;}, "cfg_vo_yuki")); obj.setPos(583, 328); obj.check=sf.yuki_voice; obj.hint="Toggle Yuki's voice On/Off"; //ボタン 19(ボイス再生設定:栄一) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.eiiti_voice=obj.check;}, "cfg_vo_eiichi")); obj.setPos(583, 354); obj.check=sf.eiiti_voice; obj.hint="Toggle Eiichi's voice On/Off"; //ボタン 20(ボイス再生設定:その他) ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.other_voice=obj.check;}, "cfg_vo_other")); obj.setPos(583, 382); obj.check=sf.other_voice; obj.hint="Toggle Misc. voices On/Off"; //ボタン 21 ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.canclickskip=obj.check;}, "cfg_c_effskip")); obj.setPos(35, 462); obj.check=sf.canclickskip; obj.hint="Enables skipping screen effects with the left mouse button"; //ボタン 22 ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.chr_correct=obj.check;}, "cfg_c_correct")); obj.setPos(35, 490); obj.check=sf.chr_correct; obj.hint="Character colors will reflect the background"; //ボタン 23 ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.bgm_down=obj.check; if(!obj.check)kag.bgm.currentBuffer.volume=(int)100000;}, "cfg_c_bgmdown")); obj.setPos(35, 517); obj.check=sf.bgm_down; obj.hint="Lowers BGM volume when voices are playing"; //ボタン 24 ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.doSkipAndAuto=obj.check;}, "cfg_c_sanda")); obj.setPos(35,544); obj.check=sf.doSkipAndAuto; obj.hint="When on, text skipping and Auto Mode will continue after making a decision"; //ボタン 25 ConfigButtons.add(obj = new ButtonCheckBox(window, this, function(obj){ sf.voicecancel=obj.check;}, "cfg_c_vcancel")); obj.setPos(270, 462); obj.check=sf.voicecancel; obj.hint="When on, the voice will continue to play regardless of click intervention"; //ボタン 26 ConfigButtons.add(obj = new CustomCheckBox(window, this, function(){sf.face_all=true;}, 98, "cfg_face_all")); obj.setPos(263, 514); obj.check=sf.face_all; obj.hint="Show the entirety of an individual in the left corner of the screen"; //ボタン 27 var index = ConfigButtons.add(obj = new CustomCheckBox(window, this, function(){sf.face_all=false;}, 98, "cfg_face_cut")); obj.setPos(366, 521); obj.check=!sf.face_all; obj.hint="Crop left corner images to fit a square"; // お互い自動でチェック状態を入れ替えるように ConfigButtons[index-1].linkObj = ConfigButtons[index]; ConfigButtons[index].linkObj = ConfigButtons[index-1]; //ボタン 28(メッセージの不透明度) ConfigButtons.add(obj = new SliderLayer(window, this, onOpacitySlider)); obj.setPos(500, 476); obj.max=255; obj.min=0; obj.position=sf.message_opacity; obj.hint="Set the transparency of the message window"; //ボタン 29(バックボタン) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onBackButton)); obj.setPos(198, 10); obj.loadImages("cfg_exit"); obj.hint="Return to the previous screen"; //ボタン 30(タイトルに戻る) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onTitleBackButton)); obj.setPos(330, 10); obj.loadImages("cfg_backtitle"); obj.hint="Return to the title screen"; // ボタン31(デフォルトに戻す) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onDefaultButton)); obj.setPos(462,10); obj.loadImages("cfg_default"); obj.hint="Revert to default"; //ボタン 32(ゲーム終了) ConfigButtons.add(obj = new ThreeButtonLayer(window, this, onExitButton)); obj.setPos(632, 10); obj.loadImages("cfg_exitgame"); obj.hint="Quit the game"; //ボタン 33 ConfigButtons.add(obj = new global.Layer(window, this)); obj.setPos(738, 67); obj.loadImages("cfg_1page"); obj.setSizeToImageSize(); obj.width = obj.imageWidth\3; obj.hint="Open the first page"; obj.visible=true; //ボタン 34 ConfigButtons.add(obj = new ThreeButtonLayer(window, this, function(){kag.process("","*page2");})); obj.setPos(739, 218); obj.loadImages("cfg_2page"); obj.hint="Open the second page"; //ボタン 35(みにみにウィンドウ) ConfigButtons.add(obj = new global.Layer(window, this)); obj.setPos(523, 517); obj.loadImages("cfg_miniwin"); obj.setSizeToImageSize(); obj.opacity = sf.message_opacity; obj.hitThreshold = 256; obj.type=ltPsMultiplicative; obj.visible=true; obj.hint="Check the transparency with this mini window"; } function onVoTest() { switch(intrandom(0, 6)){ case 0: kag.se[kag.numSEBuffers-1].play(%[storage:"tub_0318"]); break; case 1: kag.se[kag.numSEBuffers-1].play(%[storage:"gon_0074"]); break; case 2: kag.se[kag.numSEBuffers-1].play(%[storage:"miz_0039"]); break; case 3: kag.se[kag.numSEBuffers-1].play(%[storage:"kan_0208"]); break; case 4: kag.se[kag.numSEBuffers-1].play(%[storage:"eii_0304"]); break; case 5: kag.se[kag.numSEBuffers-1].play(%[storage:"har_0546"]); break; case 6: kag.se[kag.numSEBuffers-1].play(%[storage:"mao_f"]); break; default: break; } } function onDefaultButton(obj){ // 既読文章速度 ConfigButtons[0].position = sf.alreadyreadspeed = 30; onAlreadyReadSpeed(ConfigButtons[0]); // 未読文章速度 ConfigButtons[1].position = sf.readspeed = 30; onReadSpeed(ConfigButtons[1]); // オートモードの速度 ConfigButtons[2].position = sf.autospeed = 1500; onAutoSpeed(ConfigButtons[2]); // true:既読スキップ // false:すべてスキップ ConfigButtons[3].check = sf.skipopt = true; ConfigButtons[4].check = false; // 全体ボリューム ConfigButtons[5].position = sf.globalvol = 100000; onGlobalVol(ConfigButtons[5]); // BGMボリューム ConfigButtons[6].position = sf.bgmvol = 70; onBgmVol(ConfigButtons[6]); // SEボリューム ConfigButtons[7].position = sf.sevol = 60; onSeVol(ConfigButtons[7]); // VOICEボリューム ConfigButtons[8].position = sf.vovol = 80; onVoiceVol(ConfigButtons[8]); // BGMタイトルを表示するかどうか ConfigButtons[11].check = sf.showbgmtitle = false; // ボイスの設定 ConfigButtons[12].check = sf.haru_voice=true; ConfigButtons[13].check = sf.kanon_voice=true; ConfigButtons[14].check = sf.tubaki_voice=true; ConfigButtons[15].check = sf.mizuha_voice=true; ConfigButtons[16].check = sf.maou_voice=true; ConfigButtons[17].check = sf.gonzo_voice=true; ConfigButtons[18].check = sf.yuki_voice=true; ConfigButtons[19].check = sf.eiiti_voice=true; ConfigButtons[20].check = sf.other_voice=true; // クリックでスキップが可能かどうか ConfigButtons[21].check = sf.canclickskip=false; // 立ち絵の色調補正 ConfigButtons[22].check = sf.chr_correct = false; // ボイス再生中にBGMの音量を下げるかどうか ConfigButtons[23].check = sf.bgm_down = false; // 選択肢後、スキップ・オートを継続するか? ConfigButtons[24].check = sf.doSkipAndAuto = false; // 改ページ時にボイスを止めるか? // true:止めない // false:止める ConfigButtons[25].check = sf.voicecancel = false; // 顔の切り抜き方法 ConfigButtons[26].check = sf.face_all = true; ConfigButtons[27].check = false; // メッセージフレームの不透明度 kag.fore.messages[0].opacity = kag.back.messages[0].opacity = ConfigButtons[35].opacity = ConfigButtons[28].position = sf.message_opacity = 150; } function onTitleBackButton(obj){ // タイトルからの呼び出しだった場合、何も聞かずに閉じる if(owner.configbytitle){ owner.onConfigClose(); return; } if(askYesNo("Return to the Title Screen?",,"Are you sure?")){ tf.backtitle=true; owner.onConfigClose(); } } function onExitButton(obj){ if(askYesNo("Quit the game?",,"Are you sure?")) kag.shutdown(); } function onOpacitySlider(obj) { sf.message_opacity = ConfigButtons[ConfigButtons.count-1].opacity = obj.position; kag.fore.messages[0].opacity = obj.position; kag.back.messages[0].opacity = obj.position; } function onReadSpeed(obj) { if(obj.position == 60){ kag.userChSpeed = -4; kag.setUserSpeed(); }else{ kag.userChSpeed = (70 - obj.position); kag.setUserSpeed(); } sf.readspeed = obj.position; } function onAlreadyReadSpeed(obj) { if(obj.position == 60){ kag.userCh2ndSpeed = -4; kag.setUserSpeed(); }else{ kag.userCh2ndSpeed = (70 - obj.position); kag.setUserSpeed(); } sf.alreadyreadspeed = obj.position; } function onAutoSpeed(obj) { var pos = obj.position; pos = 3900 - pos; kag.autoModePageWait = pos; kag.autoModeLineWait = int(pos / 3); sf.autospeed = obj.position; } function onGlobalVol(obj) { WaveSoundBuffer.globalVolume = obj.position; sf.globalvol = obj.position; } function onBgmVol(obj) { if(obj.position == 20) kag.bgm.setOptions(%[volume:100,gvolume:0]); else kag.bgm.setOptions(%[volume:100,gvolume:obj.position]); sf.bgmvol = obj.position; } function onSeVol(obj) { if(obj.position == 20){ for(var i = 0; i < kag.numSEBuffers-1; i++) kag.se[i].setOptions(%[volume:100,gvolume:0]); }else{ for(var i = 0; i < kag.numSEBuffers-1; i++) kag.se[i].setOptions(%[volume:100,gvolume:obj.position]); } sf.sevol = obj.position; } function onVoiceVol(obj) { if(obj.position == 20) kag.se[kag.numSEBuffers-1].setOptions(%[volume:100,gvolume:0]); else kag.se[kag.numSEBuffers-1].setOptions(%[volume:100,gvolume:obj.position]); sf.vovol = obj.position; } function onBackButton() { owner.onConfigClose(); } function show() { // レイヤを表示する enabled=false; visible = true; } function hide() { // レイヤを隠す enabled=false; } function clear() { // 画面上のボタン類をすべて非表示にするか、無効化する for(var i = ConfigButtons.count - 1; i >= 0; i--) ConfigButtons[i].visible = false; } function onKeyDown(key) { // ESC キーが押されたらレイヤを隠す if(key == VK_ESCAPE)owner.onConfigClose(); else super.onKeyDown(...); } function onMouseDown(x, y, button, shift) { if(button == mbRight)owner.onConfigClose(); return; } } class ConfigPlugin extends KAGPlugin // 「右クリック設定」プラグインクラス { var window; // ウィンドウへの参照 var config; // 設定レイヤ var configbytitle = false; var config2; function ConfigPlugin(window) { //ConfigPlugin コンストラクタ super.KAGPlugin(); // スーパークラスのコンストラクタを呼ぶ this.window = window; // window への参照を保存する //プラグイン登録時にさくっとコンフィングレイヤー作成 config = new ConfigLayer(window, kag.fore.base, this); config2 = new ConfigLayer2(window, kag.fore.base, this); } function finalize() { invalidate config if config !== void; super.finalize(...); } function show() { // タイトルに戻るフラグを倒す tf.backtitle=false; config.parent = window.back.base; // 親を再設定する // (トランジションによって表背景レイヤは変わるため) // 重ね合わせもきちんと。 config.absolute = 2000000-100; // BGMのスライダー正規化 // サウンドモードによって変更されるから。 config.ConfigButtons[6].position=sf.bgmvol; config.show(); } function show2p() { // タイトルに戻るフラグを倒す tf.backtitle=false; config2.parent = window.back.base; // 親を再設定する // (トランジションによって表背景レイヤは変わるため) // 重ね合わせもきちんと。 config2.absolute = 2000000-100; config2.show(); } function onConfigClose() { // 設定レイヤが閉じるとき closeConfig(); window.trigger('config'); //configトリガ発動 } function closeConfig() { //設定レイヤを閉じる config.hide() if config !== void; } // 以下、KAGPlugin のメソッドのオーバーライド function onStore(f, elm) { } function onRestore(f, clear, elm) { //栞を読み出すとき config.hide(); if(sf.skipopt==true)kag.clickSkipEnabled = false; else kag.clickSkipEnabled = true; // オートモードの速度を設定 kag.autoModePageWait = 2400 - sf.autospeed; // 未読文章の速度を設定 if(sf.readspeed == 60){ kag.userChSpeed = -4; kag.setUserSpeed(); }else{ kag.userChSpeed = (70 - sf.readspeed); kag.setUserSpeed(); } // 既読文章の速度を設定 if(sf.alreadyreadspeed == 60){ kag.userCh2ndSpeed = -4; kag.setUserSpeed(); }else{ kag.userCh2ndSpeed = (70 - sf.alreadyreadspeed); kag.setUserSpeed(); } // メッセージフレームの不透明度を設定 kag.fore.messages[0].opacity = sf.message_opacity; kag.back.messages[0].opacity = sf.message_opacity; } function onStableStateChanged(stable) { } function onMessageHiddenStateChanged(hidden) { } function onCopyLayer(toback) { } function onExchangeForeBack() { } function onSaveSystemVariables() { // セーブデータのコメントはこのタイミングでも scflags に // 保存しなければならない } } kag.addPlugin(global.config_object = new ConfigPlugin(kag)); @endscript @endif @return *showTitleConfig @eval exp="config_object.configbytitle=true" @jump target="*bytitle" *showconfig @eval exp="config_object.configbytitle=false" *bytitle @locklink *returnbysave @backlay @iscript config_object.show(); tf.slc_showing=true; @endscript ;@trans method=universal time=250 rule=rule_cfgopen @trans method=crossfade time=250 @wt @iscript config_object.config.enabled=true; @endscript @waittrig name="config" ;@trans method=universal time=250 rule=rule_cfgclose @trans method=crossfade time=250 @wt @iscript config_object.config.visible=false; tf.slc_showing=false; @endscript @unlocklink @return storage="title.ks" target="*title_init" cond="tf.backtitle" @return *page1 @iscript config_object.config.enabled=false; config_object.config2.enabled=false; config_object.show(); @endscript @trans method=crossfade time=250 @wt @iscript config_object.config2.removeMode(); config_object.config.enabled=true; config_object.config.setMode(); @endscript @waittrig name="config" @iscript config_object.config2.visible=false; @endscript @trans method=crossfade time=250 @wt @iscript config_object.config.removeMode(); config_object.config.visible=false; @endscript @unlocklink @return storage="title.ks" target="*title_init" cond="tf.backtitle" @return *page2 @iscript config_object.config.enabled=false; config_object.config2.enabled=false; config_object.show2p(); @endscript @trans method=crossfade time=250 @wt @iscript config_object.config2.enabled=true; config_object.config2.setMode(); @endscript @waittrig name="config" @iscript config_object.config.visible=false; @endscript @trans method=crossfade time=250 @wt @iscript config_object.config2.removeMode(); config_object.config2.visible=false; @endscript @trans method=crossfade time=0 @stoptrans @unlocklink @return storage="title.ks" target="*title_init" cond="tf.backtitle" @return