질문과 답변

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 12451
RMVXA DLC에 대해 문의 드립니다. 1 RODNEY 2014.06.01 616
RMMV DLC적용 1 ksdqnrl 2016.04.09 192
RMMV dlc적용방법 1 file 무랭 2016.09.12 1330
기타 EDGE - 'PNG의 이 파레트 타입에는 대응하지 않습니다' 해결방법 4 file 무브 2015.07.03 188
RMMV Ellye's Simple ATB 플러그인 질문 좀 여쭙겠습니다. 유뿅 2016.03.09 144
RMXP em 2 na linda 'Syntaxerror'에 대해 아시는 분? 4 bluesu1004 2012.12.31 730
RMVXA end가 몇개 필요하죠? 5 게임잘날아가는닝겐 2015.09.20 148
RMMV enemies 폴더에 추가한 이미지 파일이 연동되질 않습니다 아츠로 2016.02.25 108
기타 Enterbrain사는 RPG쯔꾸르 프로그램의 저작권 관리에서 손을 놓았나요? 6 하진 2012.04.23 3254
RMVXA esc 메뉴창 킴빛. 2014.07.01 644
RMVX ESC 키가 안먹네요. 4 로렐 2013.04.14 2683
RMVXA esc 키를 눌렀을때 메뉴 말고 다른게 뜨게 하는 방법? 5 file sudoxe 2014.01.13 1230
RMVX ESC 키와 X키를 누르면 상태창이 나오는데 X는 무시하는 방법 6 행복해 2013.09.15 1397
RMXP ESC눌렀을때 나오는 메뉴창에 대해서.... 1 붉은갈색 2013.07.19 768
RMVXA esc로 메뉴 들어갈때 레벨,MP,소지금 안뜨게하기 2 file KJ1ZZ 2014.12.24 372
플러그인 생성 RMMV ESC키가 메뉴/취소버튼을 쓰지않게하고싶습니다/ESC키는 취소만되게 하고싶습니다. 쌩촙제작자 2022.09.23 152
RMVX esg를 이용해서 메뉴커맨드를 생성했을 때 4 dlars043 2012.12.07 868
RMXP ev001이벤트가 쳐다본곳에 통행설정이 불가능한 경우라는 조건 2 CJYG* 2011.11.06 1934
RMVX Exc 키가 안눌러져요.ㅠㅠ 5 아타락시아 2011.02.27 1015
에러 해결 RMMV expParam의 정의되지 않은 속성을 읽을 수 없습니다. file 나나블랑 2021.05.26 79
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 516 Next
/ 516