질문과 답변

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 12393
RMMV dlc적용방법 1 file 무랭 2016.09.12 1330
RMMV 자동 대화장 어떻게 설정하나요? 1 file 벌레군 2016.09.11 488
RMMV MV는 몇 프레임까지 지원하나요? 2 ㅇㅂㄱㄹㅇ 2016.09.06 294
RMMV RPG MV 전투중 오류문구.. 자바스크립트관련 1 로브남 2016.09.06 235
RMMV 스킬에서 크리 100%는 불가능한가요? 7 잠행인 2016.09.06 243
RMMV mv에서 무기에 전투 시 방어무시 효과를 줄 수 없을까요 5 갈릭포테이토 2016.09.06 258
RMMV 필요할때 아이템 창을 호출하는 스크립트나 플러그인 1 겜제작광 2016.09.05 139
RMMV 플러그인 "RS_ExitDialog.js" 에 관한 질문 2 최빛빛 2016.09.05 193
RMMV 이동 금지 1 최빛빛 2016.09.02 115
RMMV 오디오 폴더에 파일을 넣어도 인식을 못하네요 2 모르모트 2016.09.02 415
RMMV mv에서 파티원수를 5명이상 활성화 시킬수있는 플러그인은 없나요? 3 발악의시번 2016.08.31 644
RMMV 웹 실행 저장위치 및 수정 방법 1 wkdrn33 2016.08.31 306
RMMV 맵에서 일반공격? 3 빠밀 2016.08.29 161
RMMV 텍스트창 대신 사진 파일로 대화창을 만들고 싶습니다 2 file 카코로 2016.08.28 683
RMMV 질문 1 file 이나다 2016.08.26 112
라이선스 RMMV MV 모바일 포팅때 글꼴파일을 게임 안에 넣어야하나요? 잠행인 2016.08.26 167
RMMV ~~.rpgmvp가 뭔가요? 2 file 무슨상관이라도 2016.08.25 7393
RMMV 일반 Actor 이벤트가 공격하게 만드는 법이 있을까요 1 빠밀 2016.08.24 110
RMMV tp가 전투끝나도 누적됬으면 좋겠어요 3 택형 2016.08.21 156
RMMV 플레이어의 좌표에 따라 이벤트가 바뀌는 것 10 file 카코로 2016.08.19 180
Board Pagination Prev 1 ... 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 ... 82 Next
/ 82