질문과 답변

Extra Form

 /*:

 * RS_ExitDialog.js

 * @plugindesc RS_ExitDialog.js

 * @author biud436

 *

 * @param Dialog Name

 * @desc Information Dialog

 * @default Information Dialog

 *

 * @param Show Custom Dialog Name

 * @desc Show Custom Dialog Name

 * @default false

 *

 * @param Exit Message

 * @desc Exit Message

 * @default Do you want to exit the game?

 *

 * @param OK Button

 * @desc OK Button's Name

 * @default OK

 *

 * @param Cancel Button

 * @desc Cancel Button's Name

 * @default Cancel

 *

 * @help

 *

 * =============================================================================

 * Plugin Commands

 * =============================================================================

 * This plugin does not provide plugin commands

 *

 * =============================================================================

 * Setup

 * =============================================================================

 * 1. Add the Notification plugin(cordova-plugin-dialogs) on Intel XDK.

 * 2. Edit an index.html file in your Game Directory using Text Editor such as Notepad++

 * You have to contain Cordova Script into <body> statement, It looks like this.

 *       ...

 *     <body style="background-color: black">

 *       <script type="text/javascript" src="cordova.js"></script>

 *       <script type="text/javascript" src="js/libs/pixi.js"></script>

 *       ...

 *     </body>

 * =============================================================================

 * Change Log

 * =============================================================================

 * 2016.05.29 - The incorrect character fixed.

 */


(function() {


  var parameters = PluginManager.parameters('RS_ExitDialog');

  var message = String(parameters['Exit Message'] || "Do you want to exit the game?" );

  var okBtn = String(parameters['OK Button'] || "OK" );

  var cancelBtn = String(parameters['Cancel Button'] || "Cancel" );

  var dialogName = String(parameters['Dialog Name'] || "Information Dialog" );

  var isCustomDialog = Boolean(parameters['Show Custom Dialog Name'] === 'true')


  document.addEventListener("deviceready", onDeviceReady, false);


  function onDeviceReady() {

      document.addEventListener("backbutton", SceneManager.detectScene, false);

  }


  function onBackKeyDown() {

      if(!Utils.isMobileDevice) return false;

      if(!isCustomDialog) dialogName = $dataSystem.gameTitle || "Information Dialog";

      navigator.notification.confirm(message, function(index) {

          if(index === 1) {

              SceneManager.exit();

          }

      }, dialogName, [okBtn, cancelBtn]);

  }


  SceneManager.detectScene = function() {

      if(SceneManager._scene instanceof Scene_Map) {

        SceneManager.goto(Scene_Title);

      } else if(SceneManager._scene instanceof Scene_Title) {

        onBackKeyDown();

      } else {

        SceneManager._scene.popScene();

      }

  }


})();


----------------------------------------------------------------------------------

 

 현재 이 플러그인을 사용하고있는데 모바일 디바이스에서 취소키를 누르면 반드시 타이틀 화면을 거쳐서

 어플을 종료할거냐고 묻는데, 이 과정에서 타이틀 화면을 안 거치고 어디서든 취소키를 입력해서

 어플을 종료할거냐 물어보도록 수정하는 방법이 궁금합니다.

Who's 최빛빛

profile
Choi Bling-Bling
[Dream Project]
[2015 Project: Arena Dream Match]
[2016 Project: 포켓브리더]
Comment '2'

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12451
RMMV 타일 리소스한계치를 늘리고싶습니다. 독재자헤르모드 2017.04.22 83
플러그인 추천 RMMV 타이틀의 그림이 움직이게 하는법을 알려주세요 1 file 알초자 2024.01.27 93
플러그인 사용 RMMV 타이틀을 스킵하고 마지막 세이브파일을 자동으로 불러오는 법 1 munkochi 2021.12.24 145
RMMV 타이틀에서 이어하기 말고 시작 버튼을 누르면 특별한 효과음을 주고싶은데 3 잠행인 2017.10.03 192
RMMV 타이틀에 있는 옵션 어떻게 없애나요? 2 file 리제트 2015.11.01 383
기본툴 사용법 RMMV 타이틀구석에 ver1.0.0하고 Author name 2019 어떻게 변경 하거나 제거 못하나요? 4 file hurakan 2020.11.17 141
기타 RMMV 타이틀과 메뉴창을 일본어로 바꾸고 샆어요 1 file 설연 2023.08.02 39
기타 RMMV 타이틀, 메뉴의 이름을 마음대로 바꿀 수 있나요? 2 아루미 2021.01.27 305
기타 RMMV 타이틀 화면을 직접 만들고싶어요. 2 file 퐁핑퐁 2019.11.18 348
RMMV 타이틀 화면에 게임 종료 버튼이 없네요... 2 이깅 2018.03.13 165
기타 RMMV 타이틀 화면 질문 2 한빛님 2019.11.19 363
RMMV 타이틀 화면 메뉴 선택 추가.. 닌텐도원숭이 2016.06.04 195
기본툴 사용법 RMMV 타이틀 창 위치 옮기는 방법 좀 알려주세요 1 뿔님 2020.03.03 454
플러그인 사용 RMMV 타이틀 윈도우 수정하는데 도와주세요 1 file 먹사 2023.05.18 90
기본툴 사용법 RMMV 타이틀 없이 바로 게임 시작할 수 있을까요? 2 동생 2021.06.26 145
에러 해결 RMMV 타이틀 실행오류 1 file 송실용 2023.09.09 45
플러그인 추천 RMMV 타이틀 시작화면 시작,이어서하기,옵션 그밑에 다른 것도 추가하고 싶습니다 1 file hurakan 2020.10.07 277
플러그인 사용 RMMV 타이틀 메뉴의 모습을 바꾸고 싶습니다 7 file 소녀160 2019.05.04 927
플러그인 추천 RMMV 타이틀 메뉴에 이미지 모음 앨범 만드는 방법 3 훈레기 2019.01.17 303
기타 RMMV 타이틀 메뉴를 추가하고싶습니다. 2 Jmyu 2019.04.01 194
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ... 82 Next
/ 82