질문과 답변

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 12441
RMVXA 고유 능력을 만들고 싶습니다 3 야느와르 2016.09.10 254
RMXP vx맵타일을 x맵타일로 2 whddbs 2016.09.10 104
RMVXA 특정 스탯을 안보이게 하고 싶어요 1 file GOETSU 2016.09.09 197
RMVXA 매핑을 하는데 제가 새로 받은 맵만 3 file AccelHacker 2016.09.09 231
RMVXA 맵칩을 다운 받았는데 맵칩 적용하려고 하면 일부 맵칩이 짤려서 적용되요 ㅠㅠ 4 file AccelHacker 2016.09.09 302
RMVXA 공격할때 배틀러 숨기는법 4 기폭 2016.09.09 155
RMVXA 스크립트 에디터에서 게임오버시... 3 BeNew 2016.09.08 145
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
RMVXA 게임 화면 크기설정 9 cchandelier 2016.09.05 1362
RMMV 필요할때 아이템 창을 호출하는 스크립트나 플러그인 1 겜제작광 2016.09.05 139
RMVXA 스위치가 먹통이에요 1 Leonis 2016.09.05 120
RMMV 플러그인 "RS_ExitDialog.js" 에 관한 질문 2 최빛빛 2016.09.05 193
rpg maker xp 한글판 문제 4 꽃돼지 2016.09.04 298
RMVXA 게임오버표시창에 관하여 2 클라크 2016.09.03 134
RMMV 이동 금지 1 최빛빛 2016.09.02 116
RMMV 오디오 폴더에 파일을 넣어도 인식을 못하네요 2 모르모트 2016.09.02 415
라이선스 기타 물어볼게있습니다. 1 fate아르토리아 2016.09.02 149
Board Pagination Prev 1 ... 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 ... 516 Next
/ 516