질문과 답변

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 RMVXA로 멀티가.. 1 여왕폐하 2016.01.27 193
RMVXA RPGVXACE 설명 잘해주는곳 2 코버넌트 2015.11.11 193
RMMV 플러그인 "RS_ExitDialog.js" 에 관한 질문 2 최빛빛 2016.09.05 193
RMVX 자체해결]스크립트를 이용, 상태창에서 칭호 등 장비아이템을 떨어뜨려 표기하고 싶습니다. 2 밥_짓는_남자 2015.05.08 193
RMVXA 조건분기 스크립트에서 AND, OR 2 하얀너울 2015.02.17 193
기타 게임 BGM들이 들리지 않는건 어떻게 해결하나요? 2 dgmon 2015.01.26 193
RMVXA 마우스 스크립트가 자꾸 충돌을 일으킵니다. 도와주세요. 2 file 만죠메군 2015.01.23 193
에러 해결 기타 울프툴 번역 도중 오류 발생 (Event 0 (common -1) ~) sman 2019.11.13 193
RMVXA 스크립트 에디터 내에서 조건분기를 사용하고 싶습니다. 8 ifeve 2016.03.09 193
기본툴 사용법 RMMV 횡스크롤 플러그인 사용 시 캐릭터칩의 좌우 애니메이션을 늘리는 방법이 궁금합니다. 5 란카듀 2021.08.29 192
기타 게임 프롤로그는 얼마나 짧게 해야되는건가여? 7 fate아르토리아 2017.11.02 192
RMMV 스크립트 명령 수행이 심각하게 느린데 이유가 뭘까요 5 잠행인 2017.10.09 192
RMMV 타이틀에서 이어하기 말고 시작 버튼을 누르면 특별한 효과음을 주고싶은데 3 잠행인 2017.10.03 192
RMMV cannot read property 'name' of undefined 1 the추장 2017.08.15 192
RMMV 자동전투 컷씬을 만들고 싶습니다. 1 시우A 2017.09.22 192
사이트 이용 그래픽 소스 사이트 1 wsf 2016.09.16 192
RMMV DLC적용 1 ksdqnrl 2016.04.09 192
플러그인 사용 RMMV 터치이벤트스크립트 어떻게쓰나요 2 file 춤추는광대 2021.05.06 192
RMMV 특정 장소에서만 연타를 못하게 하는 방법은 없나요? 투척민 2015.11.23 192
RMVXA 통행설정을x로 했는데도 불구하고 움직여 집니다 4 file reknown 2015.05.03 192
Board Pagination Prev 1 ... 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 ... 516 Next
/ 516