질문과 답변

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 21128
기타 RMMV 다들 처음 공부 하실 때 2 도리도리도리 2022.06.22 180
기타 RMMV 이미지가 커서 잘려요..ㅠㅠ알려주세요~~~ 2 file 쿠우쿠우0 2019.07.18 135
기타 RMVXA 이름입력처리가 조금 다른 것 같아요... 1 file Leme 2019.07.18 124
기타 RMMV 아이콘 적용..ㅠㅠ 2 file 쿠우쿠우0 2019.07.21 153
기타 RM2k3 RPG 2003 이미지 버튼 만들기ㅠㅠㅠ file 인큐버스 2019.07.21 243
기타 기타 알만툴 대호 열기 팀키라키라킷즈 2019.07.24 94
기타 기타 제가 간단한 게임을 만들었는데요 1 불맨 2020.10.23 504
기타 RMXP 게임 파일에서 3 TH.Wert 2020.10.22 172
기타 RMMV 캐릭터 도트를 만들고 싶습니다 1 둥근테안경 2019.08.03 186
기타 RMMV 타일셋이 줄어들었어요ㅠㅠ 1 file Candle 2019.08.12 111
기타 RMVXA 엔딩 후 선택지 추가? 1 Leme 2019.08.01 193
기타 RMVXA vx ace) 크리터컬 피해 증가 패시브를 만들고 싶습니다 5 게임이만들고파 2020.12.31 183
기타 기타 게임을 깔아보니 BGM이 없습니다...... 어떡하죠? 생각쟁이 2019.10.07 119
기타 사이트 이용 아방스 질문할때 그림 어떻게 넣나요... 10 Wolfclaw 2020.03.23 152
기타 RMMV yanfly 플러그인 우회다운로드 경로가있을까요? + 결재후 사후관리 7 wkdrn33 2020.03.23 337
기타 RMMV 영상넣기 2 ktg0310 2019.11.10 115
기타 RMMV BGM 파일에 ogg파일을 넣었는데 목록에 안뜹니다 4 설견 2019.09.16 116
기타 RMVXA 쯔꾸르 게임 실행후 캐릭터가 자동으로 이동하고 컨트롤이 되지않습니다. 귀여미드사미 2019.09.23 106
기타 기타 영어알만툴은 번역기 돌릴수잇는방법이 잇나요? 호시노요나메 2019.09.23 115
기타 RMMV 아이템 이름에 플레이어 이름을 넣고 싶습니다 모량09 2019.09.25 66
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 84 Next
/ 84