질문과 답변

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 12454
이벤트 작성 RMMV 움짤처럼 픽셀이 깨져서 흩어지는 듯한 연출을 만들고 싶어요 3 file 물돼지맛 2019.09.14 191
이벤트 작성 RMMV 텍스트 시작 위치를 바꾸고 싶습니다~ 2 츄웬 2020.05.22 191
플러그인 생성 RMMV 이 플러그인을 특정 맵(혹은 특정 스위치가 켜졌을때)만 작동하게 하고 싶습니다 2 무명시절 2020.06.02 191
RMMV 특정 장소에서만 연타를 못하게 하는 방법은 없나요? 투척민 2015.11.23 192
플러그인 사용 RMMV 터치이벤트스크립트 어떻게쓰나요 2 file 춤추는광대 2021.05.06 192
RMMV DLC적용 1 ksdqnrl 2016.04.09 192
RMMV 자동전투 컷씬을 만들고 싶습니다. 1 시우A 2017.09.22 192
RMMV 스크립트 명령 수행이 심각하게 느린데 이유가 뭘까요 5 잠행인 2017.10.09 192
RMMV [자바스크립트] 메시지창이 게이지 위에 뜨게하기 6 file 몽롱하다 2018.09.09 193
RMMV 플러그인 "RS_ExitDialog.js" 에 관한 질문 2 최빛빛 2016.09.05 193
라이선스 RMMV mv체험판을 쓰고있는데 캐릭터생성후 저장이나 불러오기하면 알만툴이 꺼져요..... 메로나낫 2019.12.11 193
기본툴 사용법 RMMV 횡스크롤 플러그인 사용 시 캐릭터칩의 좌우 애니메이션을 늘리는 방법이 궁금합니다. 5 란카듀 2021.08.29 193
기본툴 사용법 RMMV Animation.json 파일을 읽을 수 없습니다 1 file nachthexen 2022.08.21 194
기타 RMMV 타이틀 메뉴를 추가하고싶습니다. 2 Jmyu 2019.04.01 194
RMMV 인앱결제 플러그인 2 잠행인 2016.09.27 194
RMMV 타이틀에서 이어하기 말고 시작 버튼을 누르면 특별한 효과음을 주고싶은데 3 잠행인 2017.10.03 194
기타 RMMV 벽에 닿았을때라는 조건 분기를 만들 수 있나요? 3 무명시절 2020.10.17 194
기본툴 사용법 RMMV 대사창이 떠있어도 메뉴를 열수있게 하는 방법이 없을까요? 2 츄웬 2020.05.27 195
RMMV 타이틀 화면 메뉴 선택 추가.. 닌텐도원숭이 2016.06.04 195
기타 RMMV rpg maker mv 셀프스위치가 3 꽃돼지 2021.02.12 195
Board Pagination Prev 1 ... 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ... 82 Next
/ 82