질문과 답변

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 21145
기본툴 사용법 RMMV 경험치를 오르게 하는 아이템을 만들 수 있나요? 2 PPPL 2020.04.26 104
기본툴 사용법 RMMV 캐릭터 스테이터스 2 쌩촙제작자 2023.01.31 104
RMMV 보통 못 넘어가는 검은 타일임에도 한 칸 더 갈 수 있게 하는 방법. 파란소리 2018.06.25 104
맵배치 RMMV 타일셋 이미지 개수 늘리거나 속성 바꾸는거 안되나요? 소용돌이은하에서사는자 2020.08.18 104
RMMV Load 가 안돼여 ㅠㅠㅠ 닌텐도원숭이 2016.06.06 104
RMMV Lighting 관련 플러그인 활용 방법 질문 합니다. 2 기미타자 2018.07.31 104
기타 RMMV 맵 이동뒤에 플래이어 캐릭터가 움직이지 않아요 2 미이인트 2018.12.27 104
기본툴 사용법 RMMV 자작 맵칩을 데이터베이스에 적용하고 맵을 만들었는데 블럭이 투명화가 돼서 나와요 1 퐁핑퐁 2019.07.01 104
이벤트 작성 RMMV 조건분기의 조건 종류를 '그 이외의 경우일 때'를 제외하고 2가지 이상으로 할 수 있나요? 2 spsp 2021.12.20 104
이벤트 작성 RMMV 특정 좌표에서 특정 버튼 누르면 이벤트가 발생하게 하고싶어요 2 지박령 2022.12.13 104
플러그인 사용 RMMV 현재 쓰는 플러그인이 어디에 쓰이는지 알려 주실 수 있나요? 3 시나47 2022.11.05 105
기본툴 사용법 RMMV 맥에서 폰트 변경하기 소녀160 2020.02.04 105
RMMV 모바일 포팅할때 오른쪽 위에 메뉴바를 띄우는 기능이 있었던거같은데 잠행인 2016.08.08 105
스크립트 작성 RMMV 아이템 보유 여부 체크하는 스크립트 문장이 어떻게 되나요? 2 MSM 2019.02.22 105
플러그인 추천 RMMV 직업이 아닌 액터별로 특정레벨에 스킬을 배우게 할 수 있나요? 2 PPPL 2020.04.17 105
기타 RMMV 컷신스킵 3 무명시절 2020.08.30 105
RMMV 사이드뷰 배틀러 사용시 전투 메뉴 위로 배틀러가 표시되게 할수있나요? 마리모캉 2018.03.13 106
기본툴 사용법 RMMV 거너를 만들었습니다만... 5 Timeout 2020.03.27 106
기본툴 사용법 RMMV 텍스트 이벤트에 적의 이름을 띄우는 치환문자도 있나요? 5 PPPL 2020.04.13 106
RMMV 게임 시작시 창 크기를 자동으로 늘리는 방법은 없을까요? 최진홍 2017.02.12 106
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ... 83 Next
/ 83