질문과 답변

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 21133
턴제 전투 RMMV 해상도 변경후 배틀배경 늘리기 2 file 태하 2019.06.12 216
액션 전투 RMMV BGM틀면 캐릭터가 안 움직이나요? 6 file GDS아크 2020.12.05 216
RMMV js 없이 이런 내용을 구현할 수 있을까요? 3 잠행인 2017.10.13 217
플러그인 사용 RMMV 말풍선 플러그인 관련 2 file 어설프락커 2022.10.23 217
기타 RMMV (MV) 맵 내에 그림자 효과를 주고 싶습니다 2 file 미른 2022.12.26 217
RMMV 플러그인 "RS_ExitDialog.js" 에 관한 질문 2 최빛빛 2016.09.05 218
RMMV 스팀의 MV에 대해서 4 아눌 2016.05.28 218
RMMV 타이틀 화면 메뉴 선택 추가.. 닌텐도원숭이 2016.06.04 218
RMMV 화면(카메라)를 고정하고 싶습니다. Generator 2016.10.19 218
RMMV map zoom 플러그인에 대해서 질문있습니다. 2 시우A 2017.09.25 218
RMMV 의상 추가 2 oyn4564 2018.01.19 218
RMMV RPG MV 타일셋,캐릭터 질문 별로못해 2018.02.01 218
플러그인 사용 RMMV 사이드뷰 전투 질문입니다! 2 소랭소랭 2020.02.06 218
이벤트 작성 RMMV 수영 이벤트 도착시 승리 이벤트를 만들고 싶어요 1 file hurakan 2020.11.26 218
RMMV 데미지 폰트를 변경하려는데 색이 4개가 있는데 그중 하나의 용도 를 모르겠습니다 도와주세요 2 pdm0822 2017.11.12 219
기본툴 사용법 RMMV Animation.json 파일을 읽을 수 없습니다 1 file nachthexen 2022.08.21 220
RMMV 전투 종료시 아이템 삭제 2 file 리팝이 2017.05.03 220
RMMV 스크립트 없이 이런건 불가능 한가요?? 3 라케냐 2015.12.28 220
RMMV MV에서의 스위치 조작 스크립트가 뭔가요 4 게임잘날아가는닝겐 2015.12.31 220
기타 RMMV RMMV대화창 적용법 질문입니다 1 골디 2019.02.17 220
Board Pagination Prev 1 ... 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ... 83 Next
/ 83