질문과 답변

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 세이브한 후에 대사를 나오게하고싶어요(자세한건 사진을 참고) file 설연 2023.09.22 99
이벤트 작성 RMVXA 이벤트를 실행 도중 이벤트 이름 변경? 3 objuan 2019.03.27 100
RMXP XP!!액터선택창 넘어가기 늄늉이 2018.06.26 100
기타 RMMV 애니메이션 렉 줄이는 법 무명시절 2021.06.24 100
기타 기타 사건을 메모하는 플러그인이 있나요? 설연 2024.01.07 100
RMVXA [미해결] 배틀 시작시 그림에 대해 질문있습니다! 반내림 2017.03.01 100
RMMV Graphics.boxWidth의 절반값이 뭔가요? 2 잠행인 2016.10.05 100
RMVXA 이벤트 연습.. 질문 1 배수지 2016.12.12 100
RMVXA 메세지 표시 중 저장 화면을 열 수 있는 스크립트 2時 2017.04.22 100
이벤트 작성 RMVXA 이벤트가 이벤트로 가게 하기 ㅠㅠ 재질문이요 1 수학의정석 2018.12.31 100
기타 RMMV 이번에 뭐좀 만들어보려고 알만툴 사려는데요 3 화식조 2019.01.02 100
액션 전투 RMMV 전투시 질문 주지스 2020.04.24 100
스크립트 작성 RMVXA 조건 분기에 스크립트를 사용해 적용하고 싶습니다. 7 AAAA. 2023.11.17 100
기본툴 사용법 RMMV 선택지 창이 유난히 좁습니다... file 펑비 2023.11.03 100
기본툴 사용법 RMMV 텍스트 속도 조절방법 알려주실분 초본_ 2024.01.11 100
기본툴 사용법 RMMV 아이템 턴 소모 없이 사용 가능한 방법 아시는분 있을까요? 2 file SaintNoWay 2025.05.02 100
기본툴 사용법 RMVXA 선택지를 일시적으로 투명하게 만들 수 있을까요? 설님 2021.10.15 101
RMMV MV 속성스킬의 데미지를 늘릴 수 없나요? hypatia 2018.03.18 101
기타 사이트 이용 예전에 자료실 게임제작툴 탭에 줄기 2021.09.27 101
RMXP 플레이어 초기위치설정에서 캐릭터 방향이 아래로 되어있는 설정은 변경이 불가능 한가요? 배움을원하는자 2018.08.16 101
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 518 Next
/ 518