질문과 답변

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 21143
이벤트 작성 RMMV 아이템 색조변경에 질문합니다. 2 군호박 2019.03.20 97
이벤트 작성 RMMV 선택지를 하나하나 삭제해나가고 싶습니다. 4 쬬릿스 2022.06.27 347
이벤트 작성 RMMV 몬스터 헌터 같은 던전을 구현하고 싶습니다 2 sablemarten 2020.02.11 159
이벤트 작성 RMMV 궁금한 것 2 지탁 2020.02.14 89
이벤트 작성 RMMV RPGMV그림표시 크기좀알려주세요 1 백월화(白月華) 2022.02.21 233
이벤트 작성 RMMV 맵 이동 반복 이벤트 6 HYUNWOL 2022.04.17 243
이벤트 작성 RMMV 텍스트에 창 위에 이름보이게 하는 플러그인이나 텍스트 명령어 있나요 1 짓기귀찮아 2021.04.03 233
이벤트 작성 RMMV 지도 만드는법좀 알려주세요 백월화(白月華) 2023.02.12 79
이벤트 작성 RMMV 캐릭터 시체 투명해집니다. 3 file Hyeonwoo 2024.04.06 222
이벤트 작성 RMMV 이벤트로 재생하는 BGM을 반복시키고 싶습니다. 2 겐마 2020.09.13 119
이벤트 작성 RMMV 액터 이미지 변경 이벤트를 사용하는 데... 3 file pokapoka 2024.03.31 673
이벤트 작성 RMMV 전투에 돌입하지 않는데 필드에서 특정키를 눌러 스킬을 사용하는 방법 2 꾹꾹 2025.01.22 114
이벤트 작성 RMMV 파티 내 액터중 이름, 직업이 일치하는 경우에만 특정 이벤트를 표현하고자 합니다. 6 애용애용갱얼쥐 2022.12.30 124
이벤트 작성 RMMV 액터들을 보이고 싶지 않습니다. 1 pokapoka 2024.02.25 90
이벤트 작성 RMMV 무비를 반복재생 하고싶습니다 2 hurakan 2020.08.09 168
이벤트 작성 RMMV se정지가 동작하지않아요 파닥이 2020.06.08 74
이벤트 작성 RMMV 조건에 스위치를 3개이상 둘수는 없는건가요? 4 bug 2020.08.24 298
이벤트 작성 RMMV 이벤트 실행시마다 다른 텍스트가 나오게 할 수 있나요? 3 file 쫄랑이 2023.12.10 98
이벤트 작성 RMMV 대기 애니메이션 만들기 2 무명시절 2020.08.23 172
이벤트 작성 RMMV 메세지창 띄워놓고 다른 이벤트 실행하기 꽉모씨 2021.10.14 82
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ... 44 Next
/ 44