질문과 답변

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 12456
이벤트 작성 RMMV 여러 아이템을 하나의 아이템으로 만드는법 1 골디 2019.02.26 69
기본툴 사용법 RMVXA Border 스크립트 아시는 분 계실까요? file objuan 2019.02.28 69
스크립트 사용 RMMV 턴별로 데미지가 늘어나는 스킬을 만들고 싶습니다. 2 PPPL 2020.04.19 69
기타 RMMV 데미지 바닥의 판정을 명확히 하는 법있을까요? 무명시절 2020.11.22 69
플러그인 사용 RMMV 안녕하세요 Skill Cooldowns(YEP) 플러그인이 작동을 하지 않아서 질문 드립니다. 9 sakuragi 2023.04.10 69
RMVXA 전투중에 상태이상에 걸릴시 아이템 사용금지 FairyLover 2016.06.04 70
스크립트 작성 RMVXA 이동경로 스크립트 질문 환경사랑 2021.10.15 70
RMMV 이벤트로 지형변경 1 쿠르스네이 2016.12.18 70
기타 질문드립니다 3 김승욱 2018.10.08 70
기타 RMMV 여러분은 어떻게 생각하나요? 여러분의 노하우은 무엇인가요 1 간색 2019.02.02 70
에러 해결 RMXP 스크립트 연쇄 때문에 순서 오류가 생긴건지 아니면 코드 자체에 문제가 있는건지.... file 인사 2019.07.24 70
이벤트 작성 RMMV 이벤트 위치에 따른 이벤트실행 방법이 궁금합니다 2 hurakan 2021.03.15 70
스크립트 추천 RMVXA 스테이터스 애니메이션을 따로 추가할수 있나요? 겜만들고싶다앙 2021.04.22 70
스크립트 추천 RMVXA 이벤트가 움직이는 다른 이벤트를 향해 움직이는 것은 어떻게 하나요? 2 환경사랑 2021.08.23 70
에러 해결 기타 Rpg메이커mv 캐릭터에 대해 1 바당 2022.10.22 70
기타 기타 변수가 원래 많이 들어가나요? 4 보탄 2022.11.15 70
RMXP 게임 만들때 필요한 도트는 어떻게 구하나요?(혹시 만드는 법이라도 있나요?) rkdalswjd12 2018.07.01 71
RMVXA 오류에 관하여 아시는분 답변주시면 감사하겠습니다. 김숀 2016.06.01 71
기타 RMMV 전투시 선택지 변경 4 file gvqwera 2023.01.18 71
RMVXA 버프가 걸려있을 때 강룩희 2016.09.12 71
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 516 Next
/ 516