질문과 답변

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 12468
RMVX vx 이름 입력 질문 3 딩소앙 2010.11.28 672
RMXP 일러스트 대화창 1 가츄 2010.11.28 825
RMVX 초보입니다... 효과음넣는법 3 아빠와스 2010.11.28 1067
RMXP 맵 내의 셀프스위치 조작 방법 중에 3 톰윙필드 2010.11.28 670
RMXP 말풍선 스크립트 관련 질문 !! 1 lmw92 2010.11.28 1430
RMVX RPG vx 탈것 질문! 1 끼룩 2010.11.28 864
RMVX 이벤트 관련질문 사쿠치 2010.11.28 562
RMXP 게이지바 오류나네요.. 고수님들 뭐가 문젤까요. 샤프리드 2010.11.29 508
RMVX vx 액알 질문 딩소앙 2010.11.29 903
RMVX vx 전투중에 적이 분열하는 효과 낼수 없을까요? 1 왕자 2010.11.29 530
RMVX vx 퀘스트,몬스터도감 질문 1 딩소앙 2010.11.29 845
RMXP 질문이여 1 두왕자 2010.11.29 566
RMXP 광넷 사용중인데 광넷 PK하고 몬스터 죽이면 변수+1 하는거 못알아내겠네요. 1 만들어만들어 2010.11.29 687
RMVX 아이탬,무기,방어구 색깔 3 잉여잉어빵 2010.11.29 604
RMXP 캐릭터 반투명/투명 설정 1 SSunder T 2010.11.29 846
RMVX 게임폴더안에 있는 그래픽이나 오디오 같은거 어떻게 못열어보게 하나요? 2 왕자 2010.11.29 617
RMVX 외국사이트 스크립트에서 code라고 따로 창에 있는거 쓰려면 어떻게 해야하나요 2 간파더 2010.11.30 600
RMVX 이미지를 밑으로 이동해서 사라지게 어덯해 하나요? 1 RPG깐쥐남 2010.12.01 536
RMVX 시트르산님의 사이드뷰를 쓰고 있는데 1 글록 2010.12.01 898
RMVX 저 스위치는 어떨때 사용해야하나요? 1 RPG깐쥐남 2010.12.01 573
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 517 Next
/ 517