질문과 답변

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 MV에서 시야 제한을 하는법을 모릅네다. 2 간색 2019.02.10 493
액션 전투 RMMV MV에서 실시간 액션형식으로 만들어주는 플러그인이 있을까요? 2 희희낙낙 2018.12.30 1046
RMMV MV에서 실제시간 연동과 그에 따른 이벤트를 설정할 수 있나요? 3 Lut 2016.04.16 315
RMMV MV에서 윈도우 창 띄우기 hamsterjelly 2017.06.27 221
RMMV MV에서 이벤트컷을 보여주고싶은데요 2 르이메르 2016.11.18 151
플러그인 추천 RMMV MV에서 캐릭터 두 명의 동시 전투를 가능하게 하는 플러그인이 있을까요? file chichichi 2023.04.08 47
기본툴 사용법 RMMV MV에서 캐릭터 스프라이트 규칙자체를 수정할수가 있을까요? 2 희희낙낙 2019.01.01 567
RMMV mv에서 클릭을 인식하게 해주는 플러그인이 있나요? 1 잠행인 2017.07.23 224
스크립트 작성 RMMV MV에서 키보드 이동을 금지시키려면 어떻게 하면 좋을까요? 2 버섯론 2020.07.30 321
이벤트 작성 RMMV MV에서 특정 맵 한정으로 기본 텍스트 색상이 변경되게 하고 싶습니다 2 나끄 2023.12.02 40
RMMV mv에서 파티원수를 5명이상 활성화 시킬수있는 플러그인은 없나요? 3 발악의시번 2016.08.31 652
RMMV mv에서 폰트 변경 어떻게 하는건가요? 타비노 2016.02.13 320
RMMV mv에서 폰트 크기는 어떻게 조절하나요? 2 바로보쿠 2016.01.04 2427
플러그인 사용 RMMV mv에서는 캐릭터가 말할때 텍스트 음성 어떻게 하나요? 2 코볼트코 2020.11.16 723
RMMV MV에서는 폰트 바꾸려면 어디로 들어가야하죠? 1 모르모트 2016.12.31 508
RMMV MV에서의 스위치 조작 스크립트가 뭔가요 4 게임잘날아가는닝겐 2015.12.31 204
RMMV MV에선 이벤트의 프레임당 그래픽을 일일이 지정할 수 없나요? 1 file 모르모트 2016.12.29 258
플러그인 생성 RMMV mv용 시작할때 까만화면 시작하는 플러그인 있을까요 2 짓기귀찮아 2021.04.01 126
RMMV MV의 메뉴에서 레벨/HP바와 MP 바를 숨길 수 있나요? 2 염산칼슘 2017.12.11 253
RMMV mv의 폰트 크기에 관한 질문드립니다. 2 지혈이 2017.11.13 888
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