질문과 답변

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 크로노엔진 오류해결부탁드립니다 뒤웅 2019.10.24 77
기본툴 사용법 RMMV 아이템 사용시 커먼이벤트의 일부만 출력하게 할 수 있나요? 4 PPPL 2019.10.08 77
기타 RMMV 파이널판타지15나 파판7리메이크처럼 전투시스템을 구축하려 하는데 도움을 주셨으면 합니다. 2 레기우스州 2020.12.24 77
이벤트 작성 RMMV 특정 좌표에서 특정 버튼 누르면 이벤트가 발생하게 하고싶어요 2 지박령 2022.12.13 77
에러 해결 RMMV RPG Maker MV 사용 중입니다 배포 후 게임 수정이 안되네요 도와주세요ㅜㅜ 1 IN 2023.05.30 77
이벤트 작성 RMMV 특정 캐릭터들이 파티에 함께 있으면 버프가 발생하도록 만들고 싶습니다 1 유카이 2021.01.26 78
RMMV mv 트라이얼 연댕 2018.09.09 78
RMMV 혹시 기본 데이터 소스 있나요? 5 카시어스 2018.12.10 78
이벤트 작성 RMMV NPC가 해당 위치로 가면 사라지는방법을 모르겟습니다.ㅜㅜ 2 개구리코만도 2019.02.13 78
플러그인 사용 RMMV YEP Grid-free Doodads 플러그인 사용하시는 분들 구매해서 사용하셨나요? 3 하하이 2023.02.19 78
플러그인 사용 RMMV 혹시 마우스EX 사용한 사람 있나요? 2 호구랑 2020.02.13 79
기본툴 사용법 RMMV 지역 id가 구체적으로 뭔가요? 퐁핑퐁 2019.10.28 79
플러그인 사용 RMMV Orange Hud를 통해 액터의 클래스 이름을 출력하고 싶습니다. 2 디그니스 2019.10.02 79
RMMV 캐릭터의 TP 를 변수로 지정하고 싶은데 방법을 모르겠어요 PP 2017.02.02 79
RMMV 클릭 이동을 불가능하게 만들고 싶습니다. DermuD 2017.02.21 79
기본툴 사용법 RMMV 공격이 안됩니다. 1 GDS아크 2019.12.02 79
이벤트 작성 RMMV 도움이 필요합니다. 2 GDS아크 2019.12.27 79
이벤트 작성 RMMV 이벤트 만들때 스위치를 넣으면 테스트게임이 멈춰요... 1 암풀 2020.05.18 79
이벤트 작성 RMMV 플레이어가 능동적으로 버튼을 눌러서 캐릭터가 공격을 하게 하려면 어떻게 해야 하는지 알고 싶습니다ㅠㅠ(액션 RPG) 1 soul74 2022.11.27 79
기본툴 사용법 RMMV sv전투화면 변경법(안된다면 캐릭터사이즈변경법이라도)알려주실분! 1 file 쌩촙제작자 2023.02.08 80
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