设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 78|回复: 0

[转载发布] UCHU_MobileOperation_Modified_Ext

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    8037

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    30081
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    39012

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    Spoiler: For moderators
    Feel free to delete this spoiler after read it.
    I'm not the author of this plugin. I found a version of him named MVP_Gamepad in someone else's game. After that, I found the original version from Uchuzine, already with some modification made by someone called NAK(or dice2000)
    You can check the link on GitHub.
    So I made an upgrade of the plugin, but I can't make an extension, but I've identified inside the plugin the modifications that I made.
    I also tried to contact Uchuzine on twitter, but he never answers me.
    Spoiler: image



    You can find the original Help File opening this file and check the Japanese version(jp).
    The plugin parameters are translated into English by RyamBram. Please give credit to him.
    Original Plugin by NAK >https://github.com/DICE2000/RPGMVplugins/blob/master/UCHU_MobileOperation_Modified.js


    Introduction
    This plugin adds onscreen buttons for mobile devices. The buttons are adjustable according to portrait or landscape mode, and you can render them off-screen on the black bars.

    Features

    -----Default by Uchuzine and Nak-----

    • Shows a DPAD and Action and Cancel Button on the screen.
    • Buttons can be placed outside the game screen on the black bars.
    • Hide or show buttons through a switch.
    • Set button size in plugin parameters(it resizes the image if necessary).
    • You can configure actions for when you press or hold your fingers on the black bar.
    • You can swipe left or right on the screen and operate the functions of the PageUp or PageDown buttons.
    • Hide the buttons when the message box is open.

    -----Added by Eliaquim-----

    • You can add PageUp, PageDown, Shift, Menu buttons on the screen.
    • Buttons can blink when you pressed them(change the opacity).
    • You can choose if the cancel button will work to call the menu too or only to cancel.

    ScreenShots
    Spoiler










    How to use

    Spoiler-----Default by Uchuzine and Nak-----

    Button Images
    •Button images should be in the /img/system folder.
    •And they should be done in a 1: 1 ratio.
    •For directionals, make sure the center of the directional pad is in the center of the image.

    Button position parameters
    •For each button you can choose a preset start position:
    •left-top, right-top, left-bottom, right-bottom.
    •To change them from these initial positions you can set the margin in the plugin parameters.

    Button visible parameter
    •Set whether you want the button to appear or not. If you disable it in the parameters, you will not be able to enable them within the game.

    DPad Operation Range
    •Specifies the size of the button's tap area.
    •When 1: The touch area is the image area.
    •When 2: The touch area is twice as large vertically and horizontally (spreading 50% out of the image).

    DPad Diagonal Range
    •Determines the direction of the character. Increasing this number will cause the character to change direction and assume a diagonal, such as up + right.
    •When “0”: Only 4 directions (up / down / left / right) can be input.
    •When “0.5”: Eight directions can be input evenly.
    •When “1”: Four-way input of “upper right”, “lower right”, “upper left”, and “lower left”.
    •The higher the number, the more mistakes occur, such as "I was going to push up but it was in the upper right".
    •If there is no problem in 4 directions, specifying “0” will minimize the operation error.

    AnalogMove
    •Set this to true for compatibility with Analog Move.

    -----Added by Eliaquim-----

    You can choose if you want the buttons to blink when you pressed them.
    Set the parameter opacity for each button to 0.5 for example. Then you can set the blink parameter to higher or lower opacity.
    You also can use this plugin commands to hide all buttons or hide specific ones.

    • show X
    • hide X

    Where X can be:
    • dirpad / ok / cancel / menu / shift / pagedown / pageup / extra / all

    NOTE: In fact, only the opacity of them will be set to 0. If you press in the place they are, they will work(but not blink, in case the blink parameter is true).

    NOTE 2: In my experience, I have to test it a lot. To find the right size for my buttons on mobile. Since it not shows in the same proportion as in desktop.

    NOTE 3: You can use CommunityBasic.js to see better the positions on the desktop if you want it to show in the black bars.
    Change the parameters "screenWidth / screenHeight" to the size that you want for the screen of your game.
    And change the parameters "changeWindowHeightTo / changeWindowWidthTo" to a size that you want, like 1280x720 or 1920x1080(16:9 - that is the majority in mobile).




    Terms of Use

    Copyright (c) 2015-2017 uchuzine, NAK
    Released under the MIT license
    http://opensource.org/licenses/mit-license.php

    You must credit Uchuzine and Nak.

    Spoiler: UCHU_MobileOperation_Modified_Ext.js
                    JavaScript:       
    1. //=============================================================================
    2. // UCHU_MobileOperation_Modified_Ext.js
    3. // Version: 1.2
    4. //----------------------------------------------------------------------------
    5. // Copyright (c) 2015-2017 uchuzine, NAK
    6. // Released under the MIT license
    7. // http://opensource.org/licenses/mit-license.php
    8. //=============================================================================
    9. /*:
    10. @plugindesc
    11. (Modified) Plug-in for smartphone operation. The virtual buttons that support landscape/portrait
    12. holding and touch operation methods have been added and expanded to make smartphone play more comfortable.
    13. @author uchuzine (modified by NAK and Eliaquim)
    14. @help
    15. UCHU_MobileOperation_Modified_Ext (Version: 1.2)
    16. ============================================================================
    17. NEW HELP FILE BY ELIAQUIM
    18. ============================================================================
    19. You can find the original Help File opening this file and check the
    20. japanese version(jp).
    21. The plugin parameters are translated to english by RyamBram. Please give
    22. credits to him.
    23. Original Plugin by NAK >
    24. https://github.com/DICE2000/RPGMVplugins/blob/master/UCHU_MobileOperation_Modified.js
    25. Translated plugin(English) by RyamBram >
    26. https://github.com/RyanBram/ryanbram.github.io/blob/166de4f01f4a09c6e86891a820a5c4c39718b427/srpg_online/js/plugins/MVP_Gamepad.js
    27. ============================================================================
    28. Introduction
    29. ============================================================================
    30. This plugin adds onscreen buttons for mobile devices. The buttons are
    31. adjustable according to portrait or landscape mode, and you can render
    32. them off-screen on the black bars.
    33. ============================================================================
    34. Features
    35. ============================================================================
    36. -----Default by Uchuzine and Nak-----
    37. • Shows a DPAD and Action and Cancel Button on the screen.
    38. • Buttons can be placed outside the game screen on the black bars.
    39. • Hide or show buttons through a switch.
    40. • Set button size in plugin parameters(it resizes the image if necessary).
    41. • You can configure actions for when you press or hold your fingers on the
    42. black bar.
    43. • You can swipe left or right on the screen and operate the functions of the
    44. PageUp or PageDown buttons.
    45. • Hide the buttons when the message box is open.
    46. -----Added by Eliaquim-----
    47. • You can add PageUp, PageDown, Shift, Menu buttons on the screen.
    48. • Buttons can blink when you pressed them(change the opacity).
    49. • You can choose if the cancel button will work to call the menu too or
    50. only to cancel.
    51. ============================================================================
    52. How to use
    53. ============================================================================
    54. -----Default by Uchuzine and Nak-----
    55. Button Images
    56. •Button images should be in the /img/system folder.
    57. •And they should be done in a 1: 1 ratio.
    58. •For directionals, make sure the center of the directional pad is in the
    59. center of the image.
    60. Button position paramters
    61. •For each button you can choose a preset start position:
    62. •left-top, right-top, left-bottom, right-bottom.
    63. •To change them from these initial positions you can set the margin in the
    64. plugin parameters.
    65. • Button visible parameter
    66. •Set whether you want the button to appear or not. If you disable it in the
    67. parameters, you will not be able to enable them within the game.
    68. • DPad Opelation Range
    69. •Specifies the size of the button's tap area.
    70. •When 1: The touch area is the image area.
    71. •When 2: The touch area is twice as large vertically and horizontally
    72. (spreading 50% out of the image).
    73. • DPad Diagonal Range
    74. •Determines the direction of the character. Increasing this number will cause
    75. the character to change direction and assume a diagonal, such as up + right.
    76. •When “0”: Only 4 directions (up / down / left / right) can be input.
    77. •When “0.5”: Eight directions can be input evenly.
    78. •When “1”: Four-way input of “upper right”, “lower right”, “upper left”,
    79. and “lower left”.
    80. •The higher the number, the more mistakes occur, such as "I was going to
    81. push up but it was in the upper right".
    82. •If there is no problem in 4 directions, specifying “0” will minimize the
    83. operation error.
    84. AnalogMove
    85. •Set this to true for compatibility with Analog Move.
    86. -----Added by Eliaquim-----
    87. You can choose if you want to the buttons blink when you pressed them.
    88. Set the parameter opacity for each button to 0.5 for example. Then you
    89. can set the blink parameter to a higher or lower opacity.
    90. You also can use this plugin commands to hide all buttons or hide specific
    91. ones.
    92. • show X
    93. • hide X
    94. Where X can be:
    95. • dirpad / ok / cancel / menu / shift / pagedown / pageup / extra / all
    96. NOTE: In fact, only the opacity of them will be set to 0. If you press in
    97. the place they are, they will work(but not blink, in case the blink parameter
    98. is true).
    99. NOTE 2: In my experience, I have to test it a lot. To find the right size for
    100. my buttons on mobile. Since it not shows in the same proportion as in desktop.
    101. NOTE 3: You can use CommunityBasic.js to see better the positions on the
    102. desktop, if you want it to show in the black bars.
    103. Change the parameters "screenWidth / screenHeight" to the size that you want
    104. for the screen of your game.
    105. And change the parameters "changeWindowHeightTo / changeWindowWidthTo" to a
    106. size that you want, like 1280x720 or 1920x1080(16:9 - that is the majority
    107. in mobile).
    108. ============================================================================
    109. Terms of Use
    110. ============================================================================
    111. Copyright (c) 2015-2017 uchuzine, NAK
    112. Released under the MIT license
    113. http://opensource.org/licenses/mit-license.php
    114. You can optionally credit me as Eliaquim or Rakuen Zero.
    115. But you must credit Uchuzine and Nak.
    116. ============================================================================
    117. Contact
    118. ============================================================================
    119. Contact me(Eliaquim):
    120. RM Web - https://forums.rpgmakerweb.com/index.php?members/eliaquim.123037/
    121. Centro Rpg Maker - https://centrorpg.com/index.php?action=profile
    122. Instagram - https://www.instagram.com/rakuen.zero
    123. Twitter - https://twitter.com/rakuenzero
    124. Facebook - https://www.facebook.com/rakuenzero
    125. @param ---PC Option---
    126. @param ---FilePath---
    127. @param ---Button Settings---
    128. @param ---Directional Button---
    129. @param ---Ok Button---
    130. @param ---Cancel Button---
    131. @param ---Menu Button---
    132. @param ---Shift Button---
    133. @param ---PageUp Button---
    134. @param ---PageDown Button---
    135. @param ---Extra Button---
    136. @param ---TouchInput Extend---
    137. @param ---Need Analog Move.js---
    138. @param PC BtnDisplay
    139. @desc Show virtual buttons when running on PC. Yes: true / Not:false
    140. Default:false
    141. @default false
    142. @type boolean
    143. @parent ---PC Option---
    144. @param PC TouchExtend
    145. @desc Enable touch operation extension when running on PC. Yes: true / Not:false
    146. Default:true
    147. @default true
    148. @type boolean
    149. @parent ---PC Option---
    150. @param DPad Image
    151. @desc The file path of the D-Pad image
    152. @default DirPad
    153. @require 1
    154. @dir img/system/
    155. @type file
    156. @parent ---FilePath---
    157. @param ActionBtn Image
    158. @desc The file path of the Action button image
    159. @default ActionButton
    160. @require 1
    161. @dir img/system/
    162. @type file
    163. @parent ---FilePath---
    164. @param CancelBtn Image
    165. @desc File path of Cancel button image
    166. @default CancelButton
    167. @require 1
    168. @dir img/system/
    169. @type file
    170. @parent ---FilePath---
    171. @param MenuBtn Image
    172. @desc File path of Menu button image
    173. @default MenuButton
    174. @require 1
    175. @dir img/system/
    176. @type file
    177. @parent ---FilePath---
    178. @param ShiftBtn Image
    179. @desc File path of Shift button image
    180. @default ShiftButton
    181. @require 1
    182. @dir img/system/
    183. @type file
    184. @parent ---FilePath---
    185. @param PageUpBtn Image
    186. @desc File path of PageUp button image
    187. @default PageUpButton
    188. @require 1
    189. @dir img/system/
    190. @type file
    191. @parent ---FilePath---
    192. @param PageDownBtn Image
    193. @desc File path of PageDown button image
    194. @default PageDownButton
    195. @require 1
    196. @dir img/system/
    197. @type file
    198. @parent ---FilePath---
    199. @param ExtraBtn Image
    200. @desc File path of Extra button image
    201. @default ExtraButton
    202. @require 1
    203. @dir img/system/
    204. @type file
    205. @parent ---FilePath---
    206. @param Blink Button Press
    207. @desc Blink the button when it's pressed.
    208. @default false
    209. @type boolean
    210. @parent ---Button Settings---
    211. @param Blink Button Opacity
    212. @desc Choose the opacity for when the button is pressed. From 0 to 1.
    213. @default 1
    214. @type number
    215. @parent ---Button Settings---
    216. @param Button Opacity
    217. @desc Button opacity (0 to 1) Default: 0.7
    218. @default 0.700
    219. @type number
    220. @max 1.000
    221. @min 0.000
    222. @decimals 3
    223. @parent ---Button Settings---
    224. @param Vertical BtnZoom
    225. @desc Magnification of all buttons when displayed in portrait 初期値:1.700
    226. @default 0.900
    227. @type number
    228. @decimals 3
    229. @parent ---Button Settings---
    230. @param Tablet BtnZoom
    231. @desc Magnification of all buttons when displayed in landscape in Tablet 初期値:0.800
    232. @default 0.800
    233. @type number
    234. @decimals 3
    235. @parent ---Button Settings---
    236. @param TabVertical BtnZoom
    237. @desc Magnification of all buttons when displayed in portrait in Tablet 初期値:1.100
    238. @default 0.900
    239. @type number
    240. @decimals 3
    241. @parent ---Button Settings---
    242. @param HideButton OnMessage
    243. @desc When the message is displayed at the bottom of the screen, lower the display order of the virtual button to the bottom of the game screen. 初期値:false
    244. @default false
    245. @type boolean
    246. @parent ---Button Settings---
    247. @param HideButton Switch
    248. @desc Control the display of virtual buttons with this numbered switch. Disabled at 0.
    249. @default 0
    250. @type number
    251. @parent ---Button Settings---
    252. @param HideButton Switch Value
    253. @desc When controlling a virtual button with a switch, set whether to display ON (true) or OFF (false).
    254. @default false
    255. @type boolean
    256. @parent ---Button Settings---
    257. @param DPad Visible
    258. @desc Show direction pad. Yes:true / Not:false. Default:true
    259. @default true
    260. @type boolean
    261. @parent ---Directional Button---
    262. @param DPad Size
    263. @desc Direction pad size (px). Initial value: 200
    264. @default 128
    265. @type number
    266. @parent ---Directional Button---
    267. @param DPad Margin
    268. @desc The position of the direction pad image. The size of the gap from the edge of the screen. (width from left; width from bottom) Initial value: 10; 10
    269. @default 20; 20
    270. @parent ---Directional Button---
    271. @param DPad Orientation
    272. @desc You want to change the reference position of the direction pad to something other than the lower left. left か right; top か bottom で指定。 初期値:left; bottom
    273. @default left; bottom
    274. @type select
    275. @option left; top
    276. @option left; bottom
    277. @option right; top
    278. @option right; bottom
    279. @parent ---Directional Button---
    280. @param DPad OpelationRange
    281. @desc For the direction pad image, the operating range of the touch (magnification, 1~ ) to widen the touch determination to the outside of the image, to prevent operation error. Initial value: 1.3
    282. @default 1.000
    283. @type number
    284. @decimals 3
    285. @parent ---Directional Button---
    286. @param DPad DiagonalRange
    287. @desc The size of the determination of the direction pad oblique direction (0-1). The easier it is to enter diagonally, the easier it is to shake the operation. 0 if it is good in four directions. Initial value: 0.3;
    288. @default 0.300
    289. @type number
    290. @max 1.000
    291. @min 0.000
    292. @decimals 3
    293. @parent ---Directional Button---
    294. @param ActionBtn Visible
    295. @desc Show Action button: true Not:false Initial value: true
    296. @default true
    297. @type boolean
    298. @parent ---Ok Button---
    299. @param ActionBtn Size
    300. @desc The size of the decision button (px). Initial value: 55
    301. @default 55
    302. @type number
    303. @parent ---Ok Button---
    304. @param ActionBtn Margin
    305. @desc The position of the decision button. The size of the gap from the edge of the screen. (width from right; width from bottom) Initial value: 70; 20
    306. @default 70; 20
    307. @parent ---Ok Button---
    308. @param ActionBtn Orientation
    309. @desc You want to change the reference position of the decision button to something other than the lower right. left か right; top か bottom で指定。 初期値:right; bottom
    310. @default right; bottom
    311. @type select
    312. @option left; top
    313. @option left; bottom
    314. @option right; top
    315. @option right; bottom
    316. @parent ---Ok Button---
    317. @param CancelBtn Visible
    318. @desc Show cancel button: true No: false 初期値:true
    319. @default true
    320. @type boolean
    321. @parent ---Cancel Button---
    322. @param CancelBtn Size
    323. @desc The size of the cancel button (px). Initial value: 55
    324. @default 55
    325. @type number
    326. @parent ---Cancel Button---
    327. @param CancelBtn Margin
    328. @desc The position of the cancel button. Specify the size of the gap from the screen edge. (Width from right; width from bottom) Initial value: 110; 10
    329. @default 5; 40
    330. @parent ---Cancel Button---
    331. @param CancelBtn Orientation
    332. @desc You want to change the reference position of the cancel button to something other than the lower right.left or right; top or bottom Specified by default value:right; bottom
    333. @default right; bottom
    334. @type select
    335. @option left; top
    336. @option left; bottom
    337. @option right; top
    338. @option right; bottom
    339. @parent ---Cancel Button---
    340. @param CancelBtn call menu?
    341. @desc Cancel Button work to call the menu to?
    342. @default false
    343. @type boolean
    344. @parent ---Cancel Button---
    345. @param MenuBtn Visible
    346. @desc Show cancel (menu) button: true No: false default value:true
    347. @default true
    348. @type boolean
    349. @parent ---Menu Button---
    350. @param MenuBtn Size
    351. @desc The size of the menu button (px). Initial value: 55
    352. @default 55
    353. @type number
    354. @parent ---Menu Button---
    355. @param MenuBtn Margin
    356. @desc The position of the menu button. Specify the size of the gap from the screen edge.(Width from right; width from bottom) Initial value: 110; 10
    357. @default 0; 0
    358. @parent ---Menu Button---
    359. @param MenuBtn Orientation
    360. @desc You want to change the reference position of the cancel button to something other than the lower right. left or right; specified by top or bottom. Initial value: right; bottom
    361. @default right; top
    362. @type select
    363. @option left; top
    364. @option left; bottom
    365. @option right; top
    366. @option right; bottom
    367. @parent ---Menu Button---
    368. @param ShiftBtn Visible
    369. @desc Show cancel (menu) button: true No: false 初期値:true
    370. @default true
    371. @type boolean
    372. @parent ---Shift Button---
    373. @param ShiftBtn Size
    374. @desc The size of the cancel button (px). Initial value: 55
    375. @default 55
    376. @type number
    377. @parent ---Shift Button---
    378. @param ShiftBtn Margin
    379. @desc The position of the cancel button. Specify the size of the gap from the screen edge. (Width from right; width from bottom) Initial value: 10; 150
    380. @default 10; 150
    381. @parent ---Shift Button---
    382. @param ShiftBtn Orientation
    383. @desc You want to change the reference position of the cancel button to something other than the lower right. left or right; specified by top or bottom. Initial value: right; bottom
    384. @default left; bottom
    385. @type select
    386. @option left; top
    387. @option left; bottom
    388. @option right; top
    389. @option right; bottom
    390. @parent ---Shift Button---
    391. @param PageUpBtn Visible
    392. @desc Show cancel (menu) button: true No: false Initial value: true
    393. @default true
    394. @type boolean
    395. @parent ---PageUp Button---
    396. @param PageUpBtn Size
    397. @desc The size of the cancel button (px). Initial value: 55
    398. @default 55
    399. @type number
    400. @parent ---PageUp Button---
    401. @param PageUpBtn Margin
    402. @desc The position of the cancel button. Specify the size of the gap from the screen edge. (Width from right; width from bottom) Initial value: 70; 90
    403. @default 70; 90
    404. @parent ---PageUp Button---
    405. @param PageUpBtn Orientation
    406. @desc You want to change the reference position of the cancel button to something other than the lower right. left or right; specified by top or bottom. Initial value: right; bottom
    407. @default right; bottom
    408. @type select
    409. @option left; top
    410. @option left; bottom
    411. @option right; top
    412. @option right; bottom
    413. @parent ---PageUp Button---
    414. @param PageDownBtn Visible
    415. @desc Show cancel (menu) button: true No: false Initial value: true
    416. @default true
    417. @type boolean
    418. @parent ---PageDown Button---
    419. @param PageDownBtn Size
    420. @desc The size of the cancel button (px). Initial value: 55
    421. @default 55
    422. @type number
    423. @parent ---PageDown Button---
    424. @param PageDownBtn Margin
    425. @desc The position of the cancel button. Specify the size of the gap from the screen edge. (Width from right; width from bottom) Initial value: 5; 110
    426. @default 5; 110
    427. @parent ---PageDown Button---
    428. @param PageDownBtn Orientation
    429. @desc You want to change the reference position of the cancel button to something other than the lower right.left or right; specified by top or bottom. Initial value: right; bottom
    430. @default right; bottom
    431. @type select
    432. @option left; top
    433. @option left; bottom
    434. @option right; top
    435. @option right; bottom
    436. @parent ---PageDown Button---
    437. @param ExtraBtn Visible
    438. @desc Show cancel (menu) button: true No: false
    439. Initial value: true
    440. @default true
    441. @type boolean
    442. @parent ---Extra Button---
    443. @param ExtraBtn Size
    444. @desc The size of the cancel button (px). Initial value: 55
    445. @default 55
    446. @type number
    447. @parent ---Extra Button---
    448. @param ExtraBtn Margin
    449. @desc The position of the cancel button. Specify the size of the gap from the screen edge. (Width from right; width from bottom) Initial value: 0; 0
    450. @default 0; 0
    451. @parent ---Extra Button---
    452. @param ExtraBtn Orientation
    453. @desc You want to change the reference position of the cancel button to something other than the lower right. left or right; specified by top or bottom. Initial value: right; bottom
    454. @default left; top
    455. @type select
    456. @option left; top
    457. @option left; bottom
    458. @option right; top
    459. @option right; bottom
    460. @parent ---Extra Button---
    461. @param Flick PageUp-PageDown
    462. @desc Flick left or right on the screen to get the PageUp/PageDown operation.When you want to switch characters on the status screen. Initial value: true
    463. @default true
    464. @type boolean
    465. @parent ---TouchInput Extend---
    466. @param HoldCanvas ActionBtn
    467. @desc Press and hold the screen to press the decision button.default value:true
    468. @default true
    469. @type boolean
    470. @parent ---TouchInput Extend---
    471. @param OutCanvas CancelBtn
    472. @desc The entire black belt outside the game screen is treated like a cancel button.default value:false
    473. @default false
    474. @type boolean
    475. @parent ---TouchInput Extend---
    476. @param OutCanvas ActionBtn
    477. @desc The entire black belt part outside the game screen becomes the decision button treatment.default value:false
    478. @default false
    479. @type boolean
    480. @parent ---TouchInput Extend---
    481. @param Analog Move
    482. @desc [* Please read AnalogMove.js first]Enable analog movement with directional pads. Initial value: false
    483. @default false
    484. @type boolean
    485. @parent ---Need Analog Move.js---
    486. @param Analog Sensitivity
    487. @desc Input sensitivity for analog movement. Increasing the value moves the character greatly with fine finger movements. Initial value: 1.800
    488. @default 1.800
    489. @type number
    490. @decimals 3
    491. @parent ---Need Analog Move.js---
    492. */
    493. /*:pt
    494. ============================================================================
    495. NOVO ARQUIVO DE AJUDA POR ELIAQUIM
    496. ============================================================================
    497. Você pode encontrar o arquivo de ajuda original este arquivo e verificando
    498. a parte correspondente ao idioma japonês(jp).
    499. ============================================================================
    500. Introdução
    501. ============================================================================
    502. Esse plugin adiciona botões na tela para dispositivos móveis. Os botões são
    503. ajustáveis de acordo com o modo retrato ou paisagem, além de poder
    504. renderizá-los fora da tela do jogo, nas barras pretas.
    505. ============================================================================
    506. Funcionalidades
    507. ============================================================================
    508. -----Padrões por Uchuzine e Nak-----
    509. • Mostra os botões de direcional, Ok e cancela/menu na tela.
    510. • Botões podem ser colocados fora da tela do jogo, nas barras pretas.
    511. • Esconder ou mostrar os botões através de uma switch.
    512. • Configurar o tamanho do botão nos parâmetros de plugin(redimensiona a imagem
    513. se necessário).
    514. • Pode configurar ações para quando apertar ou deixar pressionado os dedos
    515. na barra preta.
    516. • Pode deslizar o dedo na tela, para esquerda ou direita e operar as funções
    517. dos botões PageUp ou PageDown.
    518. • Esconder os botões quando a caixa de mensagem está aberta.
    519. -----Added by Eliaquim-----
    520. •Você pode escolher adicionar também os botões pageup / pagedown / menu /
    521. shift e um extra
    522. • Botões "piscam" quando você aperta eles(muda a opacidade).
    523. • Você pode escolher se o botão de cancelar também vai chamar o menu,
    524. ou se ele somente será usado para cancelar.
    525. ============================================================================
    526. Como usar
    527. ============================================================================
    528. -----Padrões por Uchuzine e Nak-----
    529. Imagem dos botões
    530. • Devem ser colocadas na pasta /img/system.
    531. • Devem ser com o tamanho 1:1.
    532. • Para o gráfico do direcional, tenha certeza de que o centro do gráfico
    533. esteja no centro da imagem.
    534. Parâmetros de posição dos botões
    535. • Para cada botão você pode escolher uma posição inicial pré definida:
    536. esquerda-topo, direta-topo, esquerda-fundo, direita-fundo.
    537. • Para mudá-los dessas posições você pode configurar a margem nos
    538. parâmetros de plugin.
    539. Parâmetro de visibilidade do botão
    540. • Configure se você deseja que o botão apareça ou não. Se desativá-lo nos
    541. parâmetros, não poderá ativá-los dentro do jogo.
    542. DPad Opelation Range
    543. • Especifica o tamanho da área de toque do botão.
    544. • Quando 1: A área do toque é a área da imagem.
    545. • Quando 2: A área do toque é duas vezes maior verticalmente e
    546. horizontalmente(se espalhando 50% para fora da imagem).
    547. DPad Diagonal Range
    548. • Determina a direção do personagem. Aumentar esse número fará com que o
    549. personagem mude de direção e assuma uma diagonal, como cima+direita.
    550. • Quando "0": Somente 4 direções (para cima / baixo / esquerda / direita)
    551. podem ser inseridas.
    552. • Quando "0.5": Oito direções podem ser inseridas uniformemente.
    553. • Quando "1": entrada de quatro direções de "canto superior direito",
    554. "canto inferior direito", "canto superior esquerdo" e "canto inferior
    555. esquerdo".
    556. • Quanto maior esse número, maior a chance de acontecer erros como:
    557. "Mas eu coloquei pra diagonal cima+direita e ele foi só pra cima" etc.
    558. • Se não estiver usando diagonais, sugiro deixar este valor 0.
    559. AnalogMove
    560. • Coloque esse parâmetro para verdadeiro se estiver usando o plugin
    561. analog move.
    562. -----Adicionado por Eliaquim-----
    563. Você pode escolher se quer que os botões pisquem quando apertá-los.
    564. Defina o parâmetro de opacidade para cada botão, por exemplo 0.5, e
    565. escolha a opacidade do parâmetro blink. Assim, ele pode "piscar"
    566. claro ou escuro.
    567. Também pode esconder todos os botões ou somente um em específico usando
    568. os comandos de plugin:
    569. show X
    570. hide X
    571. Onde X pode ser:
    572. dirpad / ok / cancel / menu / shift / pagedown / pageup / extra / all
    573. NOTE: Na verdade, somente a opacidade deles será mudada para 0. Se apertar
    574. no lugar onde ele está, o botão funcionará(Mas não piscará, caso o parâmetro
    575. blink for verdadeiro).
    576. NOTE 2: Na minha experiência tive de testar bastante para encontrar o tamanho
    577. certo para os meus boyões no android. Uma vez que a proporção no desktop não
    578. é a mesma no android.
    579. NOTE 3: Você pode usar o CommunityBasic.js para ver melhor as posições no
    580. desktop, se quiser mostrar os botões nas barras pretas.
    581. Mude os parâmetros "screenWidth / screenHeight" para o tamanho da resolução
    582. do seu jogo.
    583. E mude os parâmetros "changeWindowHeightTo / changeWindowWidthTo" para o
    584. tamanho da tela que você acha que seu jogo irá rodar.
    585. Por exemplo 1280x720 ou 1920x1080(16:9, que é a maioria das resoluções de
    586. mobile).
    587. ============================================================================
    588. Termos de uso
    589. ============================================================================
    590. -----Originais-----
    591. Copyright (c) 2015-2017 uchuzine e NAK
    592. Released under the MIT license
    593. http://opensource.org/licenses/mit-license.php
    594. ----Eliaquim----
    595. Você pode opcionalmente me creditar como Eliaquim ou Rakuen Zero.
    596. Mas você DEVE dar os créditos para Uchuzine e Nak.
    597. ============================================================================
    598. Contato
    599. ============================================================================
    600. Eliaquim:
    601. RM Web - https://forums.rpgmakerweb.com/index.php?members/eliaquim.123037/
    602. Centro Rpg Maker - https://centrorpg.com/index.php?action=profile
    603. Instagram - https://www.instagram.com/rakuen.zero
    604. Twitter - https://twitter.com/rakuenzero
    605. Facebook - https://www.facebook.com/rakuenzero
    606. @param ---PC Option---
    607. @param ---FilePath---
    608. @param ---Button Settings---
    609. @param ---Directional Button---
    610. @param ---Ok Button---
    611. @param ---Cancel Button---
    612. @param ---Menu Button---
    613. @param ---Shift Button---
    614. @param ---PageUp Button---
    615. @param ---PageDown Button---
    616. @param ---Extra Button---
    617. @param ---TouchInput Extend---
    618. @param ---Need Analog Move.js---
    619. @param PC BtnDisplay
    620. @desc Mostra os botões no Desktop. Yes: true / Not:false
    621. Default:false
    622. @default false
    623. @type boolean
    624. @parent ---PC Option---
    625. @param PC TouchExtend
    626. @desc Ativa a operação de toque no desktop. Yes: true / Not:false
    627. Default:true
    628. @default true
    629. @type boolean
    630. @parent ---PC Option---
    631. @param DPad Image
    632. @desc A pasta onde fica a imagem deste botão.
    633. @default DirPad
    634. @require 1
    635. @dir img/system/
    636. @type file
    637. @parent ---FilePath---
    638. @param ActionBtn Image
    639. @desc A pasta onde fica a imagem deste botão.
    640. @default ActionButton
    641. @require 1
    642. @dir img/system/
    643. @type file
    644. @parent ---FilePath---
    645. @param CancelBtn Image
    646. @desc A pasta onde fica a imagem deste botão.
    647. @default CancelButton
    648. @require 1
    649. @dir img/system/
    650. @type file
    651. @parent ---FilePath---
    652. @param MenuBtn Image
    653. @desc A pasta onde fica a imagem deste botão.
    654. @default MenuButton
    655. @require 1
    656. @dir img/system/
    657. @type file
    658. @parent ---FilePath---
    659. @param ShiftBtn Image
    660. @desc A pasta onde fica a imagem deste botão.
    661. @default ShiftButton
    662. @require 1
    663. @dir img/system/
    664. @type file
    665. @parent ---FilePath---
    666. @param PageUpBtn Image
    667. @desc A pasta onde fica a imagem deste botão.
    668. @default PageUpButton
    669. @require 1
    670. @dir img/system/
    671. @type file
    672. @parent ---FilePath---
    673. @param PageDownBtn Image
    674. @desc A pasta onde fica a imagem deste botão.
    675. @default PageDownButton
    676. @require 1
    677. @dir img/system/
    678. @type file
    679. @parent ---FilePath---
    680. @param ExtraBtn Image
    681. @desc A pasta onde fica a imagem deste botão.
    682. @default ExtraButton
    683. @require 1
    684. @dir img/system/
    685. @type file
    686. @parent ---FilePath---
    687. @param Blink Button Press
    688. @desc Pisca o botão quando ele é apertado.
    689. @default false
    690. @type boolean
    691. @parent ---Button Settings---
    692. @param Blink Button Opacity
    693. @desc Escolha a opacidade dos botões quando forem apertados. De 0 a 1.
    694. @default 1
    695. @type number
    696. @parent ---Button Settings---
    697. @param Button Opacity
    698. @desc Opacidade dos botões (0 a 1) Default: 0.7
    699. @default 0.700
    700. @type number
    701. @max 1.000
    702. @min 0.000
    703. @decimals 3
    704. @parent ---Button Settings---
    705. @param Vertical BtnZoom
    706. @desc Zoom de todos os botões quando em modo retrato. Padrão:1.700
    707. @default 0.900
    708. @type number
    709. @decimals 3
    710. @parent ---Button Settings---
    711. @param Tablet BtnZoom
    712. @desc Zoom de todos os botões quando em modo paisagem em Tablets. Padrão:0.800
    713. @default 0.800
    714. @type number
    715. @decimals 3
    716. @parent ---Button Settings---
    717. @param TabVertical BtnZoom
    718. @desc Zoom de todos os botões quando em modo retrato no Tablet. Padrão:1.100
    719. @default 0.900
    720. @type number
    721. @decimals 3
    722. @parent ---Button Settings---
    723. @param HideButton OnMessage
    724. @desc Esconde os botões quando a caixa de mensagem está aberta. Padrão:false
    725. @default false
    726. @type boolean
    727. @parent ---Button Settings---
    728. @param HideButton Switch
    729. @desc Escolhe uma switch para mostrar/esconder todos os botões. Deixe 0 para desativar.
    730. @default 0
    731. @type number
    732. @parent ---Button Settings---
    733. @param HideButton Switch Value
    734. @desc Escolha a switch.
    735. @default false
    736. @type boolean
    737. @parent ---Button Settings---
    738. @param DPad Visible
    739. @desc Usar esse botão?
    740. @default true
    741. @type boolean
    742. @parent ---Directional Button---
    743. @param DPad Size
    744. @desc Tamanho deste botão. Padrão 110.
    745. @default 110
    746. @type number
    747. @parent ---Directional Button---
    748. @param DPad Margin
    749. @desc Muda a posição do botão a partir da posição pré definida. Padrão: 10; 20
    750. @default 10; 20
    751. @parent ---Directional Button---
    752. @param DPad Orientation
    753. @desc Escolha uma das opções pré definidas. Padrão left,bottom.
    754. @default left; bottom
    755. @type select
    756. @option left; top
    757. @option left; bottom
    758. @option right; top
    759. @option right; bottom
    760. @parent ---Directional Button---
    761. @param DPad OpelationRange
    762. @desc Veja o arquivo de ajuda para mais detalhes. Initial value: 1.3
    763. @default 1.000
    764. @type number
    765. @decimals 3
    766. @parent ---Directional Button---
    767. @param DPad DiagonalRange
    768. @desc Veja o arquivo de ajuda para mais detalhes. Initial value: 0.3;
    769. @default 0.300
    770. @type number
    771. @max 1.000
    772. @min 0.000
    773. @decimals 3
    774. @parent ---Directional Button---
    775. @param ActionBtn Visible
    776. @desc Usar esse botão?
    777. @default true
    778. @type boolean
    779. @parent ---Ok Button---
    780. @param ActionBtn Size
    781. @desc Tamanho deste botão. Padrão 55.
    782. @default 55
    783. @type number
    784. @parent ---Ok Button---
    785. @param ActionBtn Margin
    786. @desc Muda a posição do botão a partir da posição pré definida. Padrão 70;20.
    787. @default 70; 20
    788. @parent ---Ok Button---
    789. @param ActionBtn Orientation
    790. @desc Escolha uma das opções pré definidas. Padrão right,bottom.
    791. @default right; bottom
    792. @type select
    793. @option left; top
    794. @option left; bottom
    795. @option right; top
    796. @option right; bottom
    797. @parent ---Ok Button---
    798. @param CancelBtn Visible
    799. @desc Usar esse botão?
    800. @default true
    801. @type boolean
    802. @parent ---Cancel Button---
    803. @param CancelBtn call menu?
    804. @desc O botão de cancelar também vai chamar o menu?
    805. @default false
    806. @type boolean
    807. @parent ---Cancel Button---
    808. @param CancelBtn Size
    809. @desc Tamanho deste botão. Padrão 55.
    810. @default 55
    811. @type number
    812. @parent ---Cancel Button---
    813. @param CancelBtn Margin
    814. @desc Muda a posição do botão a partir da posição pré definida. Padrão 5;40.
    815. @default 5; 40
    816. @parent ---Cancel Button---
    817. @param CancelBtn Orientation
    818. @desc Escolha uma das opções pré definidas. Padrão:right; bottom
    819. @default right; bottom
    820. @type select
    821. @option left; top
    822. @option left; bottom
    823. @option right; top
    824. @option right; bottom
    825. @parent ---Cancel Button---
    826. @param MenuBtn Visible
    827. @desc Usar esse botão?
    828. @default true
    829. @type boolean
    830. @parent ---Menu Button---
    831. @param MenuBtn Size
    832. @desc Tamanho deste botão. Padrão 55.
    833. @default 55
    834. @type number
    835. @parent ---Menu Button---
    836. @param MenuBtn Margin
    837. @desc Muda a posição do botão a partir da posição pré definida. Padrão 0;0.
    838. @default 0; 0
    839. @parent ---Menu Button---
    840. @param MenuBtn Orientation
    841. @desc Escolha uma das opções pré definidas. Padrão: right; bottom
    842. @default right; top
    843. @type select
    844. @option left; top
    845. @option left; bottom
    846. @option right; top
    847. @option right; bottom
    848. @parent ---Menu Button---
    849. @param ShiftBtn Visible
    850. @desc Usar esse botão?
    851. @default true
    852. @type boolean
    853. @parent ---Shift Button---
    854. @param ShiftBtn Size
    855. @desc Tamanho deste botão. Padrão 55.
    856. @default 55
    857. @type number
    858. @parent ---Shift Button---
    859. @param ShiftBtn Margin
    860. @desc Muda a posição do botão a partir da posição pré definida. Padrão 10;150.
    861. @default 10; 150
    862. @parent ---Shift Button---
    863. @param ShiftBtn Orientation
    864. @desc Escolha uma das opções pré definidas. Padrão: right; bottom
    865. @default left; bottom
    866. @type select
    867. @option left; top
    868. @option left; bottom
    869. @option right; top
    870. @option right; bottom
    871. @parent ---Shift Button---
    872. @param PageUpBtn Visible
    873. @desc Usar esse botão?
    874. @default true
    875. @type boolean
    876. @parent ---PageUp Button---
    877. @param PageUpBtn Size
    878. @desc Tamanho deste botão. Padrão 55.
    879. @default 55
    880. @type number
    881. @parent ---PageUp Button---
    882. @param PageUpBtn Margin
    883. @desc Muda a posição do botão a partir da posição pré definida. Padrão 70;90.
    884. @default 70; 90
    885. @parent ---PageUp Button---
    886. @param PageUpBtn Orientation
    887. @desc Escolha uma das opções pré definidas. Padrão: right; bottom
    888. @default right; bottom
    889. @type select
    890. @option left; top
    891. @option left; bottom
    892. @option right; top
    893. @option right; bottom
    894. @parent ---PageUp Button---
    895. @param PageDownBtn Visible
    896. @desc Usar esse botão?
    897. @default true
    898. @type boolean
    899. @parent ---PageDown Button---
    900. @param PageDownBtn Size
    901. @desc Tamanho deste botão. Padrão 55.
    902. @default 55
    903. @type number
    904. @parent ---PageDown Button---
    905. @param PageDownBtn Margin
    906. @desc Muda a posição do botão a partir da posição pré definida. Padrão 5;110.
    907. @default 5; 110
    908. @parent ---PageDown Button---
    909. @param PageDownBtn Orientation
    910. @desc Escolha uma das opções pré definidas. Padrão: right; bottom
    911. @default right; bottom
    912. @type select
    913. @option left; top
    914. @option left; bottom
    915. @option right; top
    916. @option right; bottom
    917. @parent ---PageDown Button---
    918. @param ExtraBtn Visible
    919. @desc Usar esse botão?
    920. @default true
    921. @type boolean
    922. @parent ---Extra Button---
    923. @param ExtraBtn Size
    924. @desc Tamanho deste botão. Padrão 55.
    925. @default 55
    926. @type number
    927. @parent ---Extra Button---
    928. @param ExtraBtn Margin
    929. @desc Muda a posição do botão a partir da posição pré definida. Padrão 0;0.
    930. @default 0; 0
    931. @parent ---Extra Button---
    932. @param ExtraBtn Orientation
    933. @desc Escolha uma das opções pré definidas. Padrão: right; bottom
    934. @default left; top
    935. @type select
    936. @option left; top
    937. @option left; bottom
    938. @option right; top
    939. @option right; bottom
    940. @parent ---Extra Button---
    941. @param Flick PageUp-PageDown
    942. @desc Deslize o dedo para esquerda(pgup) ou direita(pgdown) na tela para simular os efeitos de pagedown and pageUp. Padrão: true
    943. @default true
    944. @type boolean
    945. @parent ---TouchInput Extend---
    946. @param HoldCanvas ActionBtn
    947. @desc Aperte e segure o dedo na dela para fazer oe feito do botão 'ok' Padrão:true
    948. @default true
    949. @type boolean
    950. @parent ---TouchInput Extend---
    951. @param OutCanvas CancelBtn
    952. @desc A barra preta inteira funcionará como o botão 'cancelar'. Padrão:false
    953. @default false
    954. @type boolean
    955. @parent ---TouchInput Extend---
    956. @param OutCanvas ActionBtn
    957. @desc A barra preta inteira funcionará como o botão 'ok' Padrão:false
    958. @default false
    959. @type boolean
    960. @parent ---TouchInput Extend---
    961. @param Analog Move
    962. @desc Para habilitar compatibilidade com o plugin Analog Move. Padrão: false
    963. @default false
    964. @type boolean
    965. @parent ---Need Analog Move.js---
    966. @param Analog Sensitivity
    967. @desc Sensibilidade do movimento analógico. Aumentar este valor deixa mais sensível ao toque. Padrão: 1.800
    968. @default 1.800
    969. @type number
    970. @decimals 3
    971. @parent ---Need Analog Move.js---
    972. */
    973. /*:jp
    974. @plugindesc
    975. (Modified) Plug-in for smartphone operation. The virtual buttons that support landscape/portrait
    976. holding and touch operation methods have been added and expanded to make smartphone play more comfortable.
    977. @author
    978. uchuzine (modified by NAK and Eliaquim)
    979. @help
    980. UCHU_MobileOperation_Modified_Ext (Version: 1.2)
    981. This is the original help file. Please, if you want to read the new help,
    982. open this file and check it out in the global section.
    983. ------------------------------------------------------------------------------
    984. ■Changelog
    985. ------------------------------------------------------------------------------
    986. ↓------この更新履歴はUCHU_MobileOperation_Modified_Ext.jsのものです------↓
    987. 1.2 2018/1/26
    988. ・HideButton Switchオプションが有効である時に非表示にすると、
    989.  透過度を0にして完全に見えなくするようにしました。
    990. 1.1 2018/1/5
    991. ・HideButton OnMessageが有効であっても、コモンイベントの「文章の表示」に反応しない問題の修正。
    992. 1.0 2018/1/4
    993. 改変の度合いが大きいのでバージョンを見直しました。
    994. UCHU_MobileOperation_Modified_Ext.jsにリネームしました。
    995. ・MVコアスクリプト1.5.0のプラグインパラメータを設定して
    996.  多少使いやすくしました。
    997.  小数点以下3桁までを有効にしてあります。
    998.  仮想パッドの画像ファイルはimg/systemフォルダに入れて下さい。
    999.  拡張子がすべて小文字でないとエラーが出ます。
    1000. ・Chromeのバージョンによってはフリック操作でコンソールにエラーが出るので
    1001.  下記Qiita記事を参考に抑制しました。
    1002.  https://qiita.com/ru_shalm/items/4d79e94b5d9c7c88607d
    1003. ・HideButton OnMessageのメモリリーク問題に対応しました。
    1004.  参考)
    1005.  https://qiita.com/EudyptesCapital/items/d4a76d665b038e027638
    1006.  https://tm.lucky-duet.com/viewtopic.php?t=371
    1007. ・HideButton Switchオプションを追加しました。
    1008.  マップ画面(Scene_Map)/バトル画面(Scene_Battle)において、
    1009.  指定した番号のスイッチによって、仮想パッドの表示を切り替えます。
    1010.  この表示状態は他の画面(Scene)でも持ち越されます。
    1011. (マップ画面で非表示にしたままバトル画面(Scene_Battle)に移行すると、
    1012.  バトルでも表示されない)
    1013.  この機能を有効にすると、HideButton OnMessageは機能しません。
    1014. (HideButton OnMessageをtrueにしても、スイッチがOFFだと隠れない)
    1015. ・HideButton Switch Valueオプションの追加。
    1016.  ここで設定した値の時、仮想パッドが表示されます。
    1017.  HideButtonSwitchが10の時、
    1018.  このオプションをtrueに設定する:
    1019.  10番のスイッチがオンの時に表示、オフの時に非表示
    1020.  このオプションをfalseに設定する:
    1021.  10番のスイッチがオフの時に表示、オンの時に非表示
    1022. ↓------この更新履歴はUCHU_MobileOperation_Modified_Ext.jsのものです------↓
    1023. 1.1.4 2015/12/04  画面下部メッセージ表示後に下記の問題が再発する不具合を修正
    1024. 1.1.3 2015/11/29  画面左上にボタンを設置した際にボタンが押せない不具合を修正
    1025. 1.1.2 2015/11/24  パラメータを変更できない不具合を修正
    1026. 1.1.1 2015/11/23  PC上での仮想ボタン操作時の不具合を修正
    1027. 1.1.0 2015/11/17  「AnalogMove.js」使用時のアナログ移動に対応。下記説明を参照
    1028. 1.0.0 2015/11/15 プラグイン公開
    1029. ↓------以下の説明はUCHU_MobileOperation_Modified_Ext.jsのものです------↓
    1030. ------------------------------------------------------------------------------
    1031. ■特徴
    1032. ------------------------------------------------------------------------------
    1033. プラグイン作成にあたり、por Masked氏のMBS_MobileDirPad.jsを参考にしています。
    1034. ○本プラグインの特徴
    1035. ・ゲーム画面外(黒帯部分)にボタンを設置するため、プレイ画面に干渉しにくい
    1036. ・パッドやボタンは個別に表示/非表示の切り替えが可能
    1037. ・ボタンの基準点を画面四隅のいずれかに指定でき、縦持ち操作に対応可能
    1038. ・方向パッドの操作性を重視し、タッチ判定領域、斜め方向の感度など調整可能
    1039.  (詳細は下記の説明を参照)
    1040. ・方向パッドによる移動と、デフォルトの目的地タッチによる移動を併用可能
    1041. ・特定のタッチ操作、ジェスチャーによるボタン操作の拡張
    1042. これらを利用し、
    1043. ・仮想十字キーは使わずに、MENUボタンと決定ボタンのみ使用
    1044. ・ボタンは全て使用せず、画面長押しでオート連打、画面外タッチでメニュー呼出
    1045. といった使い方もできます。
    1046. ------------------------------------------------------------------------------
    1047. ■一部のパラメータの説明
    1048. ------------------------------------------------------------------------------
    1049. ▼ DPad OpelationRange(方向パッド作動領域)‥‥
    1050. 方向パッド画像の表示サイズに対する、タッチ判定領域の大きさを倍率で指定します。
    1051. 数値を上げても見た目は変わりませんが、画像の中心から外側に判定が広がります。
    1052. 例)
    1053. 「1」のとき‥‥画像のサイズがタッチ判定の大きさになる(画像の内接円の中のみ)
    1054. 「2」のとき‥‥タッチ判定の大きさが縦横2倍になる(画像の外側に50%ずつ広がる)
    1055. 数値を上げることで操作ミスを防ぎ、操作性を上げることができますが
    1056. 上げ過ぎて他のボタン等に重なってしまわないように注意してください。
    1057. ▼ DPad DiagonalRange(方向パッドの斜め方向範囲)‥‥
    1058. 方向の判定は、パッド画像の対角線を境界線にして上下左右に分けていますが、
    1059. この数値を上げると、対角線上をタッチしたときにその両側の方向がオンになり
    1060. (「右」+「上」など)、8方向判定ができるようになります。
    1061. 8方向移動のプラグインを使用している時などは、この数値を設定してください。
    1062. 数値の大きさが斜め判定角度の広さとなり、「0~1」の範囲で指定します
    1063. 例)
    1064. 「0」のとき‥‥上下左右の4方向のみ入力可能。
    1065. 「0.5」のとき‥均等8分割の8方向入力が可能。
    1066. 「1」のとき‥‥「右上」「右下」「左上」「左下」の4方向入力。
    1067. 数値を上げるほど、「上を押すつもりが右上になっていた」等のミスが起こるため
    1068. 4方向で問題ない場合は、「0」を指定すると操作ミスが最小限になります。
    1069. (var1.1.0より追加)
    1070. ▼ AnalogMove(アナログ移動)‥‥
    1071. サンシロ様のプラグイン「AnalogMove.js」使用時に、アナログ移動を可能にします。
    1072. 方向パッドの中心からタッチ位置の距離と角度で、ドット単位の移動ができます。
    1073. 使用の際はプラグインマネージャーで、先に「AnalogMove.js」を読み込み
    1074. こちらのパラメータ「AnalogMove」をtrueに変えてください。
    1075. ※アナログ移動使用中は、「DPad DiagonalRange」の数値は無視されます。
    1076. ▼ AnalogSensitivity(入力感度)‥‥
    1077. 「AnalogSensitivity」は入力感度で、数値を上げるほど
    1078. 最大値(最大スピード)まで入力するのに必要な指の動きが小さくなります。
    1079. 例)
    1080. 「1」のとき‥‥入力判定の外端で最大値に。大きな指の移動が必要。
    1081. 「DPad OpelationRange」と同じとき‥‥方向パッド画像の外端で最大値に。
    1082. DPad OpelationRangeよりも大きめの数値を指定すると、入力が楽になります。
    1083. (DPad OpelationRangeの初期値1.3に対し、AnalogSensitivityの初期値は1.8です)
    1084. ------------------------------------------------------------------------------
    1085. ■パッド、ボタン画像について
    1086. ------------------------------------------------------------------------------
    1087. ・(追加)パッド・ボタン画像はシステムフォルダ(img/system)に入れ、
    1088.  拡張子(.png)はすべて小文字にしてください。
    1089. ・画像ファイルは任意のサイズで作成可能ですが、縦横比1:1で作成してください。
    1090.  表示の際は、「DPad Size」で指定したpixel数にリサイズされます。
    1091.  ボタン画像も同様です。
    1092. ・方向パッドのグラフィックの中心が画像の中心になるようにしてください。
    1093. @param ---PC Option---
    1094. @param ---FilePath---
    1095. @param ---Button Settings---
    1096. @param ---Directional Button---
    1097. @param ---Ok Button---
    1098. @param ---Cancel Button---
    1099. @param ---Menu Button---
    1100. @param ---Shift Button---
    1101. @param ---PageUp Button---
    1102. @param ---PageDown Button---
    1103. @param ---Extra Button---
    1104. @param ---TouchInput Extend---
    1105. @param ---Need Analog Move.js---
    1106. @param PC BtnDisplay
    1107. @desc Show virtual buttons when running on PC. Yes: true / Not:false
    1108. Default:false
    1109. @default false
    1110. @type boolean
    1111. @parent ---PC Option---
    1112. @param PC TouchExtend
    1113. @desc Enable touch operation extension when running on PC. Yes: true / Not:false
    1114. Default:true
    1115. @default true
    1116. @type boolean
    1117. @parent ---PC Option---
    1118. @param DPad Image
    1119. @desc The file path of the D-Pad image
    1120. @default DirPad
    1121. @require 1
    1122. @dir img/system/
    1123. @type file
    1124. @parent ---FilePath---
    1125. @param ActionBtn Image
    1126. @desc The file path of the Action button image
    1127. @default ActionButton
    1128. @require 1
    1129. @dir img/system/
    1130. @type file
    1131. @parent ---FilePath---
    1132. @param CancelBtn Image
    1133. @desc File path of Cancel button image
    1134. @default CancelButton
    1135. @require 1
    1136. @dir img/system/
    1137. @type file
    1138. @parent ---FilePath---
    1139. @param MenuBtn Image
    1140. @desc File path of Menu button image
    1141. @default MenuButton
    1142. @require 1
    1143. @dir img/system/
    1144. @type file
    1145. @parent ---FilePath---
    1146. @param ShiftBtn Image
    1147. @desc File path of Shift button image
    1148. @default ShiftButton
    1149. @require 1
    1150. @dir img/system/
    1151. @type file
    1152. @parent ---FilePath---
    1153. @param PageUpBtn Image
    1154. @desc File path of PageUp button image
    1155. @default PageUpButton
    1156. @require 1
    1157. @dir img/system/
    1158. @type file
    1159. @parent ---FilePath---
    1160. @param PageDownBtn Image
    1161. @desc File path of PageDown button image
    1162. @default PageDownButton
    1163. @require 1
    1164. @dir img/system/
    1165. @type file
    1166. @parent ---FilePath---
    1167. @param ExtraBtn Image
    1168. @desc File path of Extra button image
    1169. @default ExtraButton
    1170. @require 1
    1171. @dir img/system/
    1172. @type file
    1173. @parent ---FilePath---
    1174. @param Blink Button Press
    1175. @desc Blink the button when it's pressed.
    1176. @default false
    1177. @type boolean
    1178. @parent ---Button Settings---
    1179. @param Blink Button Opacity
    1180. @desc Choose the opacity for when the button is pressed. From 0 to 1.
    1181. @default 1
    1182. @type number
    1183. @parent ---Button Settings---
    1184. @param Button Opacity
    1185. @desc Button opacity (0 to 1) Default: 0.7
    1186. @default 0.700
    1187. @type number
    1188. @max 1.000
    1189. @min 0.000
    1190. @decimals 3
    1191. @parent ---Button Settings---
    1192. @param Vertical BtnZoom
    1193. @desc Magnification of all buttons when displayed in portrait
    1194. 初期値:1.700
    1195. @default 0.900
    1196. @type number
    1197. @decimals 3
    1198. @parent ---Button Settings---
    1199. @param Tablet BtnZoom
    1200. @desc Magnification of all buttons when displayed in landscape in Tablet
    1201. 初期値:0.800
    1202. @default 0.800
    1203. @type number
    1204. @decimals 3
    1205. @parent ---Button Settings---
    1206. @param TabVertical BtnZoom
    1207. @desc Magnification of all buttons when displayed in portrait in Tablet
    1208. 初期値:1.100
    1209. @default 0.900
    1210. @type number
    1211. @decimals 3
    1212. @parent ---Button Settings---
    1213. @param HideButton OnMessage
    1214. @desc When the message is displayed at the bottom of the screen, lower the display order of the virtual button to the bottom of the game screen.
    1215. 初期値:false
    1216. @default false
    1217. @type boolean
    1218. @parent ---Button Settings---
    1219. @param HideButton Switch
    1220. @desc Control the display of virtual buttons with this numbered switch. Disabled at 0.
    1221. @default 0
    1222. @type number
    1223. @parent ---Button Settings---
    1224. @param HideButton Switch Value
    1225. @desc When controlling a virtual button with a switch, set whether to display ON (true) or OFF (false).
    1226. @default false
    1227. @type boolean
    1228. @parent ---Button Settings---
    1229. @param DPad Visible
    1230. @desc Show direction pad. Yes:true / Not:false. Default:true
    1231. @default true
    1232. @type boolean
    1233. @parent ---Directional Button---
    1234. @param DPad Size
    1235. @desc Direction pad size (px). Initial value: 200
    1236. @default 128
    1237. @type number
    1238. @parent ---Directional Button---
    1239. @param DPad Margin
    1240. @desc The position of the direction pad image. The size of the gap from the edge of the screen.
    1241. (width from left; width from bottom) Initial value: 10; 20
    1242. @default 10; 20
    1243. @parent ---Directional Button---
    1244. @param DPad Orientation
    1245. @desc You want to change the reference position of the direction pad to something other than the lower left.
    1246. left か right; top か bottom で指定。 初期値:left; bottom
    1247. @default left; bottom
    1248. @type select
    1249. @option left; top
    1250. @option left; bottom
    1251. @option right; top
    1252. @option right; bottom
    1253. @parent ---Directional Button---
    1254. @param DPad OpelationRange
    1255. @desc For the direction pad image, the operating range of the touch (magnification, 1~ )
    1256. to widen the touch determination to the outside of the image, to prevent operation error. Initial value: 1.3
    1257. @default 1.000
    1258. @type number
    1259. @decimals 3
    1260. @parent ---Directional Button---
    1261. @param DPad DiagonalRange
    1262. @desc The size of the determination of the direction pad oblique direction (0-1). The easier it is to enter diagonally, the easier it is to shake the operation. 0 if it is good in four directions. Initial value: 0.3;
    1263. @default 0.300
    1264. @type number
    1265. @max 1.000
    1266. @min 0.000
    1267. @decimals 3
    1268. @parent ---Directional Button---
    1269. @param ActionBtn Visible
    1270. @desc Show Action button: true Not:false Initial value: true
    1271. @default true
    1272. @type boolean
    1273. @parent ---Ok Button---
    1274. @param ActionBtn Size
    1275. @desc The size of the decision button (px). Initial value: 55
    1276. @default 55
    1277. @type number
    1278. @parent ---Ok Button---
    1279. @param ActionBtn Margin
    1280. @desc The position of the decision button. The size of the gap from the edge of the screen.
    1281. (width from right; width from bottom) Initial value: 70; 20
    1282. @default 70; 20
    1283. @parent ---Ok Button---
    1284. @param ActionBtn Orientation
    1285. @desc You want to change the reference position of the decision button to something other than the lower right.
    1286. left か right; top か bottom で指定。 初期値:right; bottom
    1287. @default right; bottom
    1288. @type select
    1289. @option left; top
    1290. @option left; bottom
    1291. @option right; top
    1292. @option right; bottom
    1293. @parent ---Ok Button---
    1294. @param CancelBtn Visible
    1295. @desc キャンセル(メニュー)ボタンを表示する:true しない:false
    1296. 初期値:true
    1297. @default true
    1298. @type boolean
    1299. @parent ---Cancel Button---
    1300. @param CancelBtn call menu?
    1301. @desc Cancel Button work to call the menu to?
    1302. @default false
    1303. @type boolean
    1304. @parent ---Cancel Button---
    1305. @param CancelBtn Size
    1306. @desc キャンセルボタンの大きさ(px)。 初期値:55
    1307. @default 55
    1308. @type number
    1309. @parent ---Cancel Button---
    1310. @param CancelBtn Margin
    1311. @desc キャンセルボタンの位置。画面端からの隙間の大きさで指定。
    1312. (右からの幅; 下からの幅) 初期値:5; 40
    1313. @default 5; 40
    1314. @parent ---Cancel Button---
    1315. @param CancelBtn Orientation
    1316. @desc キャンセルボタンの基準位置を、右下以外に変えたい場合。
    1317. left か right; top か bottomで指定。 初期値:right; bottom
    1318. @default right; bottom
    1319. @type select
    1320. @option left; top
    1321. @option left; bottom
    1322. @option right; top
    1323. @option right; bottom
    1324. @parent ---Cancel Button---
    1325. @param MenuBtn Visible
    1326. @desc キャンセル(メニュー)ボタンを表示する:true しない:false
    1327. 初期値:true
    1328. @default true
    1329. @type boolean
    1330. @parent ---Menu Button---
    1331. @param MenuBtn Size
    1332. @desc キャンセルボタンの大きさ(px)。 初期値:55
    1333. @default 55
    1334. @type number
    1335. @parent ---Menu Button---
    1336. @param MenuBtn Margin
    1337. @desc キャンセルボタンの位置。画面端からの隙間の大きさで指定。
    1338. (右からの幅; 下からの幅) 初期値:0; 0
    1339. @default 0; 0
    1340. @parent ---Menu Button---
    1341. @param MenuBtn Orientation
    1342. @desc キャンセルボタンの基準位置を、右下以外に変えたい場合。
    1343. left か right; top か bottomで指定。 初期値:right; bottom
    1344. @default right; top
    1345. @type select
    1346. @option left; top
    1347. @option left; bottom
    1348. @option right; top
    1349. @option right; bottom
    1350. @parent ---Menu Button---
    1351. @param ShiftBtn Visible
    1352. @desc キャンセル(メニュー)ボタンを表示する:true しない:false
    1353. 初期値:true
    1354. @default true
    1355. @type boolean
    1356. @parent ---Shift Button---
    1357. @param ShiftBtn Size
    1358. @desc キャンセルボタンの大きさ(px)。 初期値:55
    1359. @default 55
    1360. @type number
    1361. @parent ---Shift Button---
    1362. @param ShiftBtn Margin
    1363. @desc キャンセルボタンの位置。画面端からの隙間の大きさで指定。
    1364. (右からの幅; 下からの幅) 初期値:10; 150
    1365. @default 10; 150
    1366. @parent ---Shift Button---
    1367. @param ShiftBtn Orientation
    1368. @desc キャンセルボタンの基準位置を、右下以外に変えたい場合。
    1369. left か right; top か bottomで指定。 初期値:right; bottom
    1370. @default right; bottom
    1371. @type select
    1372. @option left; top
    1373. @option left; bottom
    1374. @option right; top
    1375. @option right; bottom
    1376. @parent ---Shift Button---
    1377. @param PageUpBtn Visible
    1378. @desc キャンセル(メニュー)ボタンを表示する:true しない:false
    1379. 初期値:true
    1380. @default true
    1381. @type boolean
    1382. @parent ---PageUp Button---
    1383. @param PageUpBtn Size
    1384. @desc キャンセルボタンの大きさ(px)。 初期値:55
    1385. @default 55
    1386. @type number
    1387. @parent ---PageUp Button---
    1388. @param PageUpBtn Margin
    1389. @desc キャンセルボタンの位置。画面端からの隙間の大きさで指定。
    1390. (右からの幅; 下からの幅) 初期値:70; 90
    1391. @default 70; 90
    1392. @parent ---PageUp Button---
    1393. @param PageUpBtn Orientation
    1394. @desc キャンセルボタンの基準位置を、右下以外に変えたい場合。
    1395. left か right; top か bottomで指定。 初期値:right; bottom
    1396. @default right; bottom
    1397. @type select
    1398. @option left; top
    1399. @option left; bottom
    1400. @option right; top
    1401. @option right; bottom
    1402. @parent ---PageUp Button---
    1403. @param PageDownBtn Visible
    1404. @desc キャンセル(メニュー)ボタンを表示する:true しない:false
    1405. 初期値:true
    1406. @default true
    1407. @type boolean
    1408. @parent ---PageDown Button---
    1409. @param PageDownBtn Size
    1410. @desc キャンセルボタンの大きさ(px)。 初期値:55
    1411. @default 55
    1412. @type number
    1413. @parent ---PageDown Button---
    1414. @param PageDownBtn Margin
    1415. @desc キャンセルボタンの位置。画面端からの隙間の大きさで指定。
    1416. (右からの幅; 下からの幅) 初期値:5; 110
    1417. @default 5; 110
    1418. @parent ---PageDown Button---
    1419. @param PageDownBtn Orientation
    1420. @desc キャンセルボタンの基準位置を、右下以外に変えたい場合。
    1421. left か right; top か bottomで指定。 初期値:right; bottom
    1422. @default right; bottom
    1423. @type select
    1424. @option left; top
    1425. @option left; bottom
    1426. @option right; top
    1427. @option right; bottom
    1428. @parent ---PageDown Button---
    1429. @param ExtraBtn Visible
    1430. @desc キャンセル(メニュー)ボタンを表示する:true しない:false
    1431. 初期値:true
    1432. @default true
    1433. @type boolean
    1434. @parent ---Extra Button---
    1435. @param ExtraBtn Size
    1436. @desc キャンセルボタンの大きさ(px)。 初期値:55
    1437. @default 55
    1438. @type number
    1439. @parent ---Extra Button---
    1440. @param ExtraBtn Margin
    1441. @desc キャンセルボタンの位置。画面端からの隙間の大きさで指定。
    1442. (右からの幅; 下からの幅) 初期値:0; 0
    1443. @default 0; 0
    1444. @parent ---Extra Button---
    1445. @param ExtraBtn Orientation
    1446. @desc キャンセルボタンの基準位置を、右下以外に変えたい場合。
    1447. left か right; top か bottomで指定。 初期値:right; bottom
    1448. @default left; top
    1449. @type select
    1450. @option left; top
    1451. @option left; bottom
    1452. @option right; top
    1453. @option right; bottom
    1454. @parent ---Extra Button---
    1455. @param Flick PageUp-PageDown
    1456. @desc Flick left or right on the screen to get the PageUp/PageDown operation.
    1457. ステータス画面でキャラを切り替えたい時などに。初期値:true
    1458. @default true
    1459. @type boolean
    1460. @parent ---TouchInput Extend---
    1461. @param HoldCanvas ActionBtn
    1462. @desc Press and hold the screen to press the decision button.
    1463. 初期値:true
    1464. @default true
    1465. @type boolean
    1466. @parent ---TouchInput Extend---
    1467. @param OutCanvas CancelBtn
    1468. @desc The entire black belt outside the game screen is treated like a cancel button.
    1469. 初期値:false
    1470. @default false
    1471. @type boolean
    1472. @parent ---TouchInput Extend---
    1473. @param OutCanvas ActionBtn
    1474. @desc The entire black belt part outside the game screen becomes the decision button treatment.
    1475. 初期値:false
    1476. @default false
    1477. @type boolean
    1478. @parent ---TouchInput Extend---
    1479. @param Analog Move
    1480. @desc [※AnalogMove.jsを先に読み込んでください]
    1481. 方向パッドでアナログ移動ができるようにする。初期値:false
    1482. @default false
    1483. @type boolean
    1484. @parent ---Need Analog Move.js---
    1485. @param Analog Sensitivity
    1486. @desc アナログ移動の入力感度。数値を上げると、細かい指の動きでキャラが大きく動く。
    1487. 初期値:1.800
    1488. @default 1.800
    1489. @type number
    1490. @decimals 3
    1491. @parent ---Need Analog Move.js---
    1492. */
    1493. var Imported = Imported || {};
    1494. Imported.UCHU_MobileOperation_Modified_Ext = "1.2";
    1495. var UCHU_MobileOperation_Modified_Ext = {};
    1496. var EliUCHU = EliUCHU || {};
    1497. (function() {
    1498.     "use strict";
    1499.    
    1500.     //-----------------------------------------------------------------------------
    1501.     // Setup
    1502.    
    1503. var Parameters = PluginManager.parameters('UCHU_MobileOperation_Modified_Ext');
    1504. var PRM = PRM || {};
    1505. PRM.url=[];
    1506. PRM.visible=[];
    1507. PRM.size=[];
    1508. PRM.pos=[];
    1509. PRM.spot=[];
    1510. PRM.pcBtn = Boolean(Parameters["PC BtnDisplay"] === 'true' || false);
    1511. PRM.pcExt = Boolean(Parameters["PC TouchExtend"] === 'true' || false);
    1512. PRM.url[0] = "./img/system/" + String(Parameters["DPad Image"]) + ".png";
    1513. PRM.url[1] = "./img/system/" + String(Parameters["ActionBtn Image"])+ ".png";
    1514. PRM.url[2] = "./img/system/" + String(Parameters["CancelBtn Image"])+ ".png"; // Eliaquim
    1515. PRM.url[3] = "./img/system/" + String(Parameters["MenuBtn Image"])+ ".png"; // Eliaquim
    1516. PRM.url[4] = "./img/system/" + String(Parameters["ShiftBtn Image"])+ ".png"; // Eliaquim
    1517. PRM.url[5] = "./img/system/" + String(Parameters["PageUpBtn Image"])+ ".png"; // Eliaquim
    1518. PRM.url[6] = "./img/system/" + String(Parameters["PageDownBtn Image"])+ ".png"; // Eliaquim
    1519. PRM.url[7] = "./img/system/" + String(Parameters["ExtraBtn Image"])+ ".png"; // Eliaquim
    1520. PRM.blinkButton = Boolean(Parameters["Blink Button Press"] === 'true' || false); // Eliaquim
    1521. PRM.blinkButtonOpacity = Number(Parameters["Blink Button Opacity"]);
    1522. PRM.opacity = Number(Parameters["Button Opacity"]);
    1523. PRM.vZoom = Number(Parameters["Vertical BtnZoom"]);
    1524. PRM.tabZoom = Number(Parameters["Tablet BtnZoom"]);
    1525. PRM.tabvZoom = Number(Parameters["TabVertical BtnZoom"]);
    1526. PRM.hideBtn = Boolean(Parameters["HideButton OnMessage"] === 'true' || false);
    1527. PRM.visible[0] = Boolean(Parameters["DPad Visible"] === 'true' || false);
    1528. PRM.size[0] = Number(Parameters["DPad Size"]);
    1529. PRM.pos[0] =Parameters["DPad Margin"].split(";");
    1530. PRM.spot[0] = Parameters["DPad Orientation"].split(";");
    1531. PRM.pad_scale = Number(Parameters["DPad OpelationRange"]);
    1532. PRM.pad_dia = Math.max(0,Math.min(1,(1-Number(Parameters["DPad DiagonalRange"]))));
    1533. PRM.visible[1] = Boolean(Parameters["ActionBtn Visible"] === 'true' || false);
    1534. PRM.size[1] = Number(Parameters["ActionBtn Size"]);
    1535. PRM.pos[1] = Parameters["ActionBtn Margin"].split(";");
    1536. PRM.spot[1] = Parameters["ActionBtn Orientation"].split(";");
    1537. PRM.visible[2] = Boolean(Parameters["CancelBtn Visible"] === 'true' || false);
    1538. PRM.cancelasMenu =  Boolean(Parameters["CancelBtn call menu?"] === 'true' || false);
    1539. PRM.size[2] = Number(Parameters["CancelBtn Size"]);
    1540. PRM.pos[2] = Parameters["CancelBtn Margin"].split(";");
    1541. PRM.spot[2] = Parameters["CancelBtn Orientation"].split(";");
    1542. PRM.visible[3] = Boolean(Parameters["MenuBtn Visible"] === 'true' || false); // Eliaquim
    1543. PRM.size[3] = Number(Parameters["MenuBtn Size"]); // Eliaquim
    1544. PRM.pos[3] = Parameters["MenuBtn Margin"].split(";"); // Eliaquim
    1545. PRM.spot[3] = Parameters["MenuBtn Orientation"].split(";"); // Eliaquim
    1546. PRM.visible[4] = Boolean(Parameters["ShiftBtn Visible"] === 'true' || false); // Eliaquim
    1547. PRM.size[4] = Number(Parameters["ShiftBtn Size"]); // Eliaquim
    1548. PRM.pos[4] = Parameters["ShiftBtn Margin"].split(";"); // Eliaquim
    1549. PRM.spot[4] = Parameters["ShiftBtn Orientation"].split(";"); // Eliaquim
    1550. PRM.visible[5] = Boolean(Parameters["PageUpBtn Visible"] === 'true' || false); // Eliaquim
    1551. PRM.size[5] = Number(Parameters["PageUpBtn Size"]); // Eliaquim
    1552. PRM.pos[5] = Parameters["PageUpBtn Margin"].split(";"); // Eliaquim
    1553. PRM.spot[5] = Parameters["PageUpBtn Orientation"].split(";"); // Eliaquim
    1554. PRM.visible[6] = Boolean(Parameters["PageDownBtn Visible"] === 'true' || false); // Eliaquim
    1555. PRM.size[6] = Number(Parameters["PageDownBtn Size"]); // Eliaquim
    1556. PRM.pos[6] = Parameters["PageDownBtn Margin"].split(";"); // Eliaquim
    1557. PRM.spot[6] = Parameters["PageDownBtn Orientation"].split(";"); // Eliaquim
    1558. PRM.visible[7] = Boolean(Parameters["ExtraBtn Visible"] === 'true' || false); // Eliaquim
    1559. PRM.size[7] = Number(Parameters["ExtraBtn Size"]); // Eliaquim
    1560. PRM.pos[7] = Parameters["ExtraBtn Margin"].split(";"); // Eliaquim
    1561. PRM.spot[7] = Parameters["ExtraBtn Orientation"].split(";"); // Eliaquim
    1562. PRM.flickpage = Boolean(Parameters["Flick PageUp-PageDown"] === 'true' || false);
    1563. PRM.holdaction = Boolean(Parameters["HoldCanvas ActionBtn"] === 'true' || false);
    1564. PRM.outcansel = Boolean(Parameters["OutCanvas CancelBtn"] === 'true' || false);
    1565. PRM.outaction = Boolean(Parameters["OutCanvas ActionBtn"] === 'true' || false);
    1566. PRM.sensitivity = Number(Parameters["Analog Sensitivity"]);
    1567. //改変者による機能追加
    1568. PRM.hideBtnSwitch = Number(Parameters["HideButton Switch"]);
    1569. PRM.hideBtnSwitchValue = Boolean(Parameters["HideButton Switch Value"] === 'true' || false);
    1570. if(PRM.cancelasMenu) {
    1571. var cancelmode = "escape";
    1572. var cancelmode2 = "escapeBtn"
    1573. }else{
    1574. var cancelmode = "cancel";
    1575. var cancelmode2 = "cancelBtn"
    1576. };
    1577. var btn_id=["DirPad","ok",cancelmode,"menu","shift","pageup","pagedown","extra"];
    1578. var current_zoom=1;   
    1579. var st_x = 0;
    1580. var st_y = 0;
    1581. var pad_range=PRM.size[0]*PRM.pad_scale;
    1582. var pad_size=pad_range*current_zoom/2;
    1583. var Btn_ready=false;
    1584. var Btn_hide=false;
    1585. var PressBtn=false;
    1586. var dirx=0;
    1587. var diry=0;
    1588. var touchx=0;
    1589. var touchy=0;
    1590. var autofire=false;
    1591. var hvzoom=[1, PRM.vZoom];
    1592. var DirPadOp=false; // Eliaquim
    1593. var okOp=false; // Eliaquim
    1594. var cancelOp=false; // Eliaquim
    1595. var menuOp=false; // Eliaquim
    1596. var shiftOp=false; // Eliaquim
    1597. var pageupOP=false; // Eliaquim
    1598. var pagedownOP=false; // Eliaquim
    1599. var extraOp=false; // Eliaquim
    1600. var ua = (function(u){
    1601.     return {
    1602.     Tablet:(u.indexOf("windows") != -1 && u.indexOf("touch") != -1) || u.indexOf("ipad") != -1 || (u.indexOf("android") != -1 && u.indexOf("mobile") == -1) || (u.indexOf("firefox") != -1 && u.indexOf("tablet") != -1) || u.indexOf("kindle") != -1 || u.indexOf("silk") != -1 || u.indexOf("playbook") != -1
    1603.     };
    1604. })(window.navigator.userAgent.toLowerCase());
    1605. if(ua.Tablet){
    1606.     hvzoom=[PRM.tabZoom, PRM.tabvZoom];
    1607. }
    1608. if (!Utils.isMobileDevice() && !PRM.pcBtn) {PRM.visible[0]=PRM.visible[1]=PRM.visible[2]=PRM.visible[3]=PRM.visible[4]=PRM.visible[5]=PRM.visible[6]=PRM.visible[7]=false;} //add
    1609. //-----------------------------------------------------------------------------
    1610. // Locate_DirPad
    1611. function Locate_DirPad() {
    1612.     this.initialize.apply(this, arguments);
    1613. }
    1614. Locate_DirPad.prototype.initialize = function() {
    1615.     var img = new Image();
    1616.     var url = PRM.url[0];
    1617.     img.onerror = function() {Graphics.printError('DirPad Image was Not Found:',url);};
    1618.     img.src = url;
    1619.     img = null;
    1620.     this.Div = document.createElement("div");
    1621.     this.Div.id = 'Dirpad';
    1622.     this.Div.style.position = 'fixed';
    1623.     this.Div.style[PRM.spot[0][0].replace(/\s+/g, "")] = String(PRM.pos[0][0]-(pad_range-PRM.size[0])/2)+'px';
    1624.     this.Div.style[PRM.spot[0][1].replace(/\s+/g, "")] = String(PRM.pos[0][1]-(pad_range-PRM.size[0])/2)+'px';
    1625.     this.Div.style.width = pad_range+'px';
    1626.     this.Div.style.height = pad_range+'px';
    1627.     this.Div.style.opacity = PRM.opacity;
    1628.     this.Div.style.zIndex = '11';
    1629.     this.Div.style.userSelect="none";
    1630.     this.Div.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)";
    1631.     this.Div.style.background = 'url('+PRM.url[0]+') 50% 50% / '+String(Math.round(PRM.size[0]/pad_range*100))+'% no-repeat';
    1632.    
    1633.     if(!Utils.isMobileDevice() && PRM.pcBtn){
    1634.         this.Div.addEventListener('mousedown', function(e) {
    1635.             if (!SceneManager.isSceneChanging()){dirope(e.layerX,e.layerY,true);PressBtn=true;}
    1636.         }, false);
    1637.         this.Div.addEventListener('mousemove', function(e) {
    1638.             if(PressBtn && !SceneManager.isSceneChanging()){dirope(e.layerX,e.layerY,false);}
    1639.         }, false);
    1640.         this.Div.addEventListener('mouseup', function() {
    1641.             disope();PressBtn=false;
    1642.         }, false);
    1643.         this.Div.addEventListener('mouseout', function() {
    1644.             disope();PressBtn=false;
    1645.         }, false);
    1646.     }
    1647.     this.Div.addEventListener('touchstart', function(e) {
    1648.         PressBtn=true;
    1649.         if (!SceneManager.isSceneChanging()){
    1650.             dirope(e.touches[0].clientX-dirx, e.touches[0].clientY-diry,true)};
    1651.     }, false);
    1652.     this.Div.addEventListener('touchmove', function(e) {
    1653.         if (!SceneManager.isSceneChanging()){
    1654.             dirope(e.touches[0].clientX-dirx, e.touches[0].clientY-diry,false)};
    1655.         PressBtn=true;
    1656.     }, false);
    1657.     this.Div.addEventListener('touchend', function() {
    1658.         disope();PressBtn=false;
    1659.     }, false);
    1660.         document.body.appendChild(this.Div);
    1661. };
    1662. function dirope(xx,yy,st) {
    1663.     touchx=(xx-pad_size)/pad_size;
    1664.     touchy=(yy-pad_size)/pad_size;
    1665.     if(st && Math.sqrt(touchx*touchx+touchy*touchy)>1){
    1666.         disope();
    1667.     }else{
    1668.         //Blink the button!
    1669.         if(PRM.blinkButton && Btn_hide === false && DirPadOp === false) {
    1670.             document.getElementById("Dirpad").style.opacity = PRM.blinkButtonOpacity;
    1671.         }
    1672.         if(touchx>Math.abs(touchy)*PRM.pad_dia){
    1673.             Input._currentState['right']=true;
    1674.             Input._currentState['left']=false;
    1675.         } else if(touchx<-Math.abs(touchy)*PRM.pad_dia){
    1676.             Input._currentState['left']=true;
    1677.             Input._currentState['right']=false;
    1678.         } else {
    1679.             Input._currentState['left']=false;
    1680.             Input._currentState['right']=false;
    1681.         }
    1682.         if(touchy>Math.abs(touchx)*PRM.pad_dia){
    1683.             Input._currentState['down']=true;
    1684.             Input._currentState['up']=false;}
    1685.         else if(touchy<-Math.abs(touchx)*PRM.pad_dia){
    1686.             Input._currentState['up']=true;
    1687.             Input._currentState['down']=false;
    1688.             } else {
    1689.             Input._currentState['up']=false;
    1690.             Input._currentState['down']=false;
    1691.             }
    1692.     }
    1693. };
    1694. function disope() {
    1695.     touchx=0; touchy=0;
    1696.     Input._currentState['up']=false;
    1697.     Input._currentState['down']=false;
    1698.     Input._currentState['left']=false;
    1699.     Input._currentState['right']=false;
    1700.     //blink dpad
    1701.     if(PRM.blinkButton && Btn_hide === false && DirPadOp === false) {
    1702.         document.getElementById("Dirpad").style.opacity = PRM.opacity;
    1703.     }
    1704. };
    1705. EliUCHU.Scene_Base_update = Scene_Base.prototype.update;
    1706.     Scene_Base.prototype.update = function() {
    1707.         EliUCHU.Scene_Base_update.call(this);
    1708.     if(PRM.blinkButton && Btn_hide === false) {
    1709.         // OK BUTTON
    1710.         if(PRM.visible[1] && !okOp) {
    1711.             if(Input._currentState['ok'] == true) {
    1712.                 document.getElementById("okBtn").style.opacity = PRM.blinkButtonOpacity;
    1713.             }else{
    1714.                 document.getElementById("okBtn").style.opacity = PRM.opacity;
    1715.             }
    1716.         }
    1717.             // CANCEL BUTTON
    1718.         if(PRM.visible[2] && !cancelOp) {
    1719.             if(Input._currentState[cancelmode] == true) {
    1720.                 document.getElementById(cancelmode2).style.opacity = PRM.blinkButtonOpacity;
    1721.             }else{
    1722.                 document.getElementById(cancelmode2).style.opacity = PRM.opacity;
    1723.             }
    1724.         }
    1725.             // MENU BUTTON
    1726.         if(PRM.visible[3] && !menuOp) {
    1727.             if(Input._currentState['menu'] == true) {
    1728.                 document.getElementById("menuBtn").style.opacity = PRM.blinkButtonOpacity;
    1729.             }else{
    1730.                 document.getElementById("menuBtn").style.opacity = PRM.opacity;
    1731.             }
    1732.         }
    1733.             // SHIFT BUTTON
    1734.         if(PRM.visible[4] && !shiftOp) {
    1735.             if(Input._currentState['shift'] == true ) {
    1736.                 document.getElementById("shiftBtn").style.opacity = PRM.blinkButtonOpacity;
    1737.             }else{
    1738.                 document.getElementById("shiftBtn").style.opacity = PRM.opacity;
    1739.             }
    1740.         }
    1741.             // PAGE UP BUTTON
    1742.         if(PRM.visible[5] && !pageupOP) {
    1743.             if(Input._currentState['pageup'] == true) {
    1744.                 document.getElementById("pageupBtn").style.opacity = PRM.blinkButtonOpacity;
    1745.             }else{
    1746.                 document.getElementById("pageupBtn").style.opacity = PRM.opacity;
    1747.             }
    1748.         }
    1749.             // PAGEDOWN BUTTON
    1750.         if(PRM.visible[6] && !pagedownOP) {
    1751.             if(Input._currentState['pagedown'] == true) {
    1752.                 document.getElementById("pagedownBtn").style.opacity = PRM.blinkButtonOpacity;
    1753.             }else{
    1754.                 document.getElementById("pagedownBtn").style.opacity = PRM.opacity;
    1755.             }
    1756.         }
    1757.             // Extra Button
    1758.         if(PRM.visible[7] && !extraOp) {
    1759.             if(Input._currentState['extra'] == true) {
    1760.                 document.getElementById("extraBtn").style.opacity = PRM.blinkButtonOpacity;
    1761.             }else{
    1762.                 document.getElementById("extraBtn").style.opacity = PRM.opacity;
    1763.             }
    1764.         }
    1765.     }
    1766. };
    1767. //-----------------------------------------------------------------------------
    1768. // Locate_Button
    1769. function Locate_Button() {
    1770.     this.initialize.apply(this, arguments);
    1771. }
    1772. Locate_Button.prototype.initialize = function(type) {
    1773.     var img = new Image();
    1774.     var url = PRM.url[type];
    1775.     img.onerror = function() {Graphics.printError('Button Image was Not Found:',url);};
    1776.     img.src = url;
    1777.     img = null;
    1778.     this.Div = document.createElement("div");
    1779.     this.Div.id = btn_id[type]+'Btn';
    1780.     this.Div.style.position = 'fixed';
    1781.     this.Div.style[PRM.spot[type][0].replace(/\s+/g, "")] = PRM.pos[type][0]+'px';
    1782.     this.Div.style[PRM.spot[type][1].replace(/\s+/g, "")] = PRM.pos[type][1]+'px';
    1783.     this.Div.style.width = PRM.size[type]+'px';
    1784.     this.Div.style.height = PRM.size[type]+'px';
    1785.     this.Div.style.opacity = PRM.opacity;
    1786.     this.Div.style.zIndex = '11';
    1787.     this.Div.style.userSelect="none";
    1788.     this.Div.style.background = 'url('+PRM.url[type]+') 0 0 / cover no-repeat';
    1789.    
    1790.     if(!Utils.isMobileDevice() && PRM.pcBtn){
    1791.         this.Div.addEventListener('mousedown', function() {
    1792.             Input._currentState[btn_id[type]] = true;
    1793.             PressBtn=true;
    1794.         }, false);
    1795.         this.Div.addEventListener('mouseover', function() {
    1796.             if(TouchInput.isPressed()){
    1797.                 Input._currentState[btn_id[type]] = true;
    1798.                 PressBtn=true;
    1799.                 return false;}
    1800.         }, false);
    1801.         this.Div.addEventListener('mouseup', function() {
    1802.             Input._currentState[btn_id[type]] = false;
    1803.             PressBtn=false;
    1804.         }, false);
    1805.         this.Div.addEventListener('mouseout', function() {
    1806.             Input._currentState[btn_id[type]] = false;
    1807.             PressBtn=false;
    1808.         }, false);
    1809.     }
    1810.    
    1811.     this.Div.addEventListener('touchstart', function() {
    1812.         if (!SceneManager.isSceneChanging()){
    1813.             Input._currentState[btn_id[type]] = true;
    1814.             PressBtn=true;
    1815.         }
    1816.     }, false);
    1817.     this.Div.addEventListener('touchend', function() {
    1818.         Input._currentState[btn_id[type]] = false;
    1819.         PressBtn=false;
    1820.     }, false);
    1821.    
    1822.     document.body.appendChild(this.Div);
    1823. };
    1824. //-----------------------------------------------------------------------------
    1825. // Replace function
    1826.         
    1827. var Scene_Base_start = Scene_Base.prototype.start;
    1828. Scene_Base.prototype.start = function() {
    1829.         Scene_Base_start.call(this);
    1830.     if (Utils.isMobileDevice() || PRM.pcBtn) {
    1831.         if(!Btn_ready){
    1832.             Btn_ready=true;
    1833.             if(PRM.visible[0]){this.DirPad = new Locate_DirPad();}
    1834.             if(PRM.visible[1]){this.okButton = new Locate_Button(1);}
    1835.             if(PRM.visible[2]){this.canselButton = new Locate_Button(2);}
    1836.             if(PRM.visible[3]){this.mennuButton = new Locate_Button(3);} // Eliaquim
    1837.             if(PRM.visible[4]){this.shiftiButton = new Locate_Button(4);} // Eliaquim
    1838.             if(PRM.visible[5]){this.pgupButton = new Locate_Button(5);} // Eliaquim
    1839.             if(PRM.visible[6]){this.pgdwiButton = new Locate_Button(6);} // Eliaquim
    1840.             if(PRM.visible[7]){this.extriButton = new Locate_Button(7);} // Eliaquim
    1841.             Graphics._updateRealScale();
    1842.             document.documentElement.style["-webkit-user-select"]="none";
    1843.             document.addEventListener("touchmove", function(evt) {evt.preventDefault();}, {passive: false});
    1844.         }
    1845.     }
    1846. };
    1847.     // Added other buttons (Eliaquim)
    1848.     if(PRM.visible[0] || PRM.visible[1] || PRM.visible[2] || PRM.visible[3] || PRM.visible[4] || PRM.visible[5] || PRM.visible[6] || PRM.visible[7]){
    1849.         var Game_Temp_setDestination = Game_Temp.prototype.setDestination;
    1850.         Game_Temp.prototype.setDestination = function(x, y) {
    1851.             Game_Temp_setDestination.apply(this, arguments);
    1852.             if(PressBtn){
    1853.                 this._destinationX = null;
    1854.                 this._destinationY = null;
    1855.             }
    1856.         };
    1857.         
    1858.         var Graphics_updateRealScale = Graphics._updateRealScale;
    1859.         Graphics._updateRealScale = function() {
    1860.             Graphics_updateRealScale.call(this);
    1861.             if (this._stretchEnabled) {
    1862.                 if(document.getElementById("Dirpad")){
    1863.                 if(window.innerWidth<window.innerHeight){current_zoom=hvzoom[1];}else{current_zoom=hvzoom[0];}
    1864.                 pad_size=pad_range*current_zoom/2;
    1865.                 if(PRM.visible[0]){
    1866.                         document.getElementById("Dirpad").style.zoom=current_zoom;
    1867.                         dirx=document.getElementById("Dirpad").offsetLeft*current_zoom;
    1868.                         diry=document.getElementById("Dirpad").offsetTop*current_zoom;
    1869.                 }// Added other buttons (Eliaquim)
    1870.                 if(PRM.visible[1]){document.getElementById("okBtn").style.zoom=current_zoom;}
    1871.                 if(PRM.visible[2]){document.getElementById(cancelmode2).style.zoom=current_zoom;}
    1872.                 if(PRM.visible[3]){document.getElementById("menuBtn").style.zoom=current_zoom;} // Eliaquim
    1873.                 if(PRM.visible[4]){document.getElementById("shiftBtn").style.zoom=current_zoom;} // Eliaquim
    1874.                 if(PRM.visible[5]){document.getElementById("pageupBtn").style.zoom=current_zoom;} // Eliaquim
    1875.                 if(PRM.visible[6]){document.getElementById("pagedownBtn").style.zoom=current_zoom;} // Eliaquim
    1876.                 if(PRM.visible[7]){document.getElementById("extraBtn").style.zoom=current_zoom;} // Eliaquim
    1877.                 }
    1878.             }
    1879.         };
    1880. }
    1881. //-----------------------------------------------------------------------------
    1882. // Option
    1883.     // UCHU_MobileOperation_Modified_Extからの改変が多い箇所
    1884.    
    1885.     //UCHU_MobileOperation_Modified_Extの同名メソッドとほぼ同じ
    1886.     Scene_Base.prototype.hideUserInterface = function() {
    1887.         if (Utils.isMobileDevice() || PRM.pcBtn) {
    1888.             Btn_hide = true;
    1889.             //元々のUCHU_MobileOperation_Modified_Extの処理 - // Added other buttons (Eliaquim)
    1890.             if(PRM.visible[0]){document.getElementById("Dirpad").style.zIndex = '0';}
    1891.             if(PRM.visible[1]){document.getElementById("okBtn").style.zIndex = '0';}
    1892.             if(PRM.visible[2]){document.getElementById(cancelmode2).style.zIndex = '0';}
    1893.             if(PRM.visible[3]){document.getElementById("menuBtn").style.zIndex = '0';} // Eliaquim
    1894.             if(PRM.visible[4]){document.getElementById("shiftBtn").style.zIndex = '0';} // Eliaquim
    1895.             if(PRM.visible[5]){document.getElementById("pageupBtn").style.zIndex = '0';} // Eliaquim
    1896.             if(PRM.visible[6]){document.getElementById("pagedownBtn").style.zIndex = '0';} // Eliaquim
    1897.             if(PRM.visible[7]){document.getElementById("extraBtn").style.zIndex = '0';} // Eliaquim
    1898.             if(PRM.hideBtnSwitch != 0){
    1899.                 //透明度をゼロにする処理 - // Added other buttons (Eliaquim)
    1900.                 if(PRM.visible[0]){document.getElementById("Dirpad").style.opacity = '0';}
    1901.                 if(PRM.visible[1]){document.getElementById("okBtn").style.opacity = '0';}
    1902.                 if(PRM.visible[2]){document.getElementById(cancelmode2).style.opacity = '0';}
    1903.                 if(PRM.visible[3]){document.getElementById("menuBtn").style.opacity = '0';} // Eliaquim
    1904.                 if(PRM.visible[4]){document.getElementById("shiftBtn").style.opacity = '0';} // Eliaquim
    1905.                 if(PRM.visible[5]){document.getElementById("pageupBtn").style.opacity = '0';} // Eliaquim
    1906.                 if(PRM.visible[6]){document.getElementById("pagedownBtn").style.opacity = '0';} // Eliaquim
    1907.                 if(PRM.visible[7]){document.getElementById("extraBtn").style.opacity = '0';} // Eliaquim
    1908.             }
    1909.         }
    1910.     };
    1911.    
    1912.     //UCHU_MobileOperation_Modified_Extの同名メソッドとほぼ同じ
    1913.     Scene_Base.prototype.showUserInterface = function() {
    1914.         if (Utils.isMobileDevice() || PRM.pcBtn) {
    1915.             Btn_hide = false;
    1916.             //元々のUCHU_MobileOperation_Modified_Extの処理 - // Added other buttons (Eliaquim)
    1917.             if(PRM.visible[0]){document.getElementById("Dirpad").style.zIndex = '11';}
    1918.             if(PRM.visible[1]){document.getElementById("okBtn").style.zIndex = '11';}
    1919.             if(PRM.visible[2]){document.getElementById(cancelmode2).style.zIndex = '11';}
    1920.             if(PRM.visible[3]){document.getElementById("menuBtn").style.zIndex = '11';} // Eliaquim
    1921.             if(PRM.visible[4]){document.getElementById("shiftBtn").style.zIndex = '11';} // Eliaquim
    1922.             if(PRM.visible[5]){document.getElementById("pageupBtn").style.zIndex = '11';} // Eliaquim
    1923.             if(PRM.visible[6]){document.getElementById("pagedownBtn").style.zIndex = '11';} // Eliaquim
    1924.             if(PRM.visible[7]){document.getElementById("extraBtn").style.zIndex = '11';} // Eliaquim
    1925.             if(PRM.hideBtnSwitch != 0){
    1926.                 //透明度を設定値にする処理 - // Added other buttons (Eliaquim)
    1927.                 if(PRM.visible[0]){document.getElementById("Dirpad").style.opacity = PRM.opacity;}
    1928.                 if(PRM.visible[1]){document.getElementById("okBtn").style.opacity = PRM.opacity;}
    1929.                 if(PRM.visible[2]){document.getElementById(cancelmode2).style.opacity = PRM.opacity;}
    1930.                 if(PRM.visible[3]){document.getElementById("menuBtn").style.opacity = PRM.opacity;} // Eliaquim
    1931.                 if(PRM.visible[4]){document.getElementById("shiftBtn").style.opacity = PRM.opacity;} // Eliaquim
    1932.                 if(PRM.visible[5]){document.getElementById("pageupBtn").style.opacity = PRM.opacity;} // Eliaquim
    1933.                 if(PRM.visible[6]){document.getElementById("pagedownBtn").style.opacity = PRM.opacity;} // Eliaquim
    1934.                 if(PRM.visible[7]){document.getElementById("extraBtn").style.opacity = PRM.opacity;} // Eliaquim               
    1935.             }
    1936.         }
    1937.     };
    1938.     //updateMainで表示状態をチェックする
    1939.     var dice2000_Scene_Map_updatemain = Scene_Map.prototype.updateMain;
    1940.     Scene_Map.prototype.updateMain = function() {
    1941.         dice2000_Scene_Map_updatemain.apply(this, arguments);
    1942.         if(PRM.hideBtnSwitch != 0){
    1943.             if($gameSwitches.value(PRM.hideBtnSwitch) != PRM.hideBtnSwitchValue){
    1944.                 if(!Btn_hide) this.hideUserInterface();
    1945.             }else{
    1946.                 if(Btn_hide) this.showUserInterface();
    1947.             }
    1948.         }else if(PRM.hideBtn){
    1949.             if($gameMessage.hasText() && !$gameMessage.scrollMode() && $gameMessage.positionType() == 2){
    1950.                 if(!Btn_hide) this.hideUserInterface();
    1951.             }else{
    1952.                 if(Btn_hide) this.showUserInterface();
    1953.             }
    1954.         }
    1955.             
    1956.     };
    1957.     var dice2000_Scene_Battle_update = Scene_Battle.prototype.update;
    1958.     Scene_Battle.prototype.update = function() {
    1959.         dice2000_Scene_Battle_update.apply(this, arguments);
    1960.         if(PRM.hideBtnSwitch != 0){
    1961.             if($gameSwitches.value(PRM.hideBtnSwitch) != PRM.hideBtnSwitchValue){
    1962.                 if(!Btn_hide) this.hideUserInterface();
    1963.             }else{
    1964.                 if(Btn_hide) this.showUserInterface();
    1965.             }
    1966.         }else if(PRM.hideBtn){
    1967.             if($gameMessage.hasText() && !$gameMessage.scrollMode() && $gameMessage.positionType() == 2){
    1968.                 if(!Btn_hide) this.hideUserInterface();
    1969.             }else{
    1970.                 if(Btn_hide) this.showUserInterface();
    1971.             }
    1972.         }
    1973.     };
    1974. if(Utils.isMobileDevice() || PRM.pcExt){
    1975.     if(PRM.holdaction){
    1976.         var TouchInput_update = TouchInput.update;
    1977.         TouchInput.update = function() {
    1978.             TouchInput_update.call(this);
    1979.             if (!PressBtn && TouchInput.isLongPressed()) {
    1980.                 Input._currentState['ok']=true;autofire=true;
    1981.             }
    1982.             if(!TouchInput.isPressed() && autofire){
    1983.                 Input._currentState['ok']=false;autofire=false;
    1984.             }
    1985.         };
    1986.     }
    1987.    
    1988.     if(PRM.flickpage || PRM.outcansel || PRM.outaction){
    1989.         TouchInput._endRequest= function(type) {
    1990.             Input._currentState[type]=false;
    1991.         }
    1992.         if(Utils.isMobileDevice()){
    1993.             var TouchInput_onTouchStart = TouchInput._onTouchStart;
    1994.             TouchInput._onTouchStart = function(event) {
    1995.                 TouchInput_onTouchStart.apply(this, arguments);
    1996.                 var touch = event.changedTouches[0];
    1997.                 if(!PressBtn){
    1998.                     st_x = Graphics.pageToCanvasX(touch.pageX);
    1999.                     st_y = Graphics.pageToCanvasY(touch.pageY);
    2000.                     if(st_x<0 || st_y<0 || st_x>Graphics.boxWidth || st_y>Graphics.boxHeight){
    2001.                         // if(PRM.cancelasMenu){
    2002.                         //     if(PRM.outcansel){Input._currentState['escape']=true;setTimeout("TouchInput._endRequest('escape');", 100);}
    2003.                         // }else {
    2004.                             if(PRM.outcansel){Input._currentState[cancelmode]=true;setTimeout("TouchInput._endRequest(cancelmode);", 100);}
    2005.                         // }
    2006.                         if(PRM.outaction){Input._currentState['ok']=true;setTimeout("TouchInput._endRequest('ok');", 100);}
    2007.                     }
    2008.                 }
    2009.             };
    2010.         }else{
    2011.             var TouchInput_onLeftButtonDown = TouchInput._onLeftButtonDown;
    2012.             TouchInput._onLeftButtonDown = function(event) {
    2013.                 TouchInput_onLeftButtonDown.apply(this, arguments);
    2014.                 if(!PressBtn){
    2015.                     st_x = Graphics.pageToCanvasX(event.pageX);
    2016.                     st_y = Graphics.pageToCanvasY(event.pageY);
    2017.                     if(st_x<0 || st_y<0 || st_x>Graphics.boxWidth || st_y>Graphics.boxHeight){
    2018.                         // if(PRM.cancelasMenu){
    2019.                         // if(PRM.outcansel){Input._currentState['escape']=true;setTimeout("TouchInput._endRequest('escape');", 100);}
    2020.                         // }else {
    2021.                         if(PRM.outcansel){Input._currentState[cancelmode]=true;setTimeout("TouchInput._endRequest(cancelmode);", 100);}
    2022.                         // }
    2023.                         if(PRM.outaction){Input._currentState['ok']=true;setTimeout("TouchInput._endRequest('ok');", 100);}
    2024.                     }
    2025.                 }
    2026.             };
    2027.         }
    2028.     }
    2029.         
    2030.     if(PRM.flickpage){
    2031.         var TouchInput_onMove = TouchInput._onMove;
    2032.         TouchInput._onMove = function(x, y) {
    2033.             TouchInput_onMove.apply(this, arguments);
    2034.             if(!PressBtn){
    2035.                 if((st_x-x)<-50 && Math.abs(st_y-y)<100){st_y=9999;Input._currentState['pageup']=true;setTimeout("TouchInput._endRequest('pageup');", 100);}
    2036.                 if((st_x-x)>50 && Math.abs(st_y-y)<100){st_y=9999;Input._currentState['pagedown']=true;setTimeout("TouchInput._endRequest('pagedown');", 100);}
    2037.             }
    2038.         }
    2039.     }
    2040. }
    2041. //AnalogMove.js
    2042. if(PRM.analogmove && Utils.isMobileDevice() || PRM.analogmove && PRM.pcBtn){
    2043.     Input.leftStick = function() {
    2044.         var threshold = 0.1;
    2045.         var x = touchx;
    2046.         var y = touchy;
    2047.         var tilt = Math.min(1,Math.sqrt(touchx*touchx+touchy*touchy)*PRM.sensitivity);
    2048.         var direction = 0.0;
    2049.         if (x === 0.0) {
    2050.             direction = (-y > 0 ? Math.PI * 0.0 : Math.PI * 1.0);
    2051.         } else if (y === 0.0) {
    2052.             direction = (-x > 0 ? Math.PI * 0.5 : Math.PI * 1.5);
    2053.         } else {
    2054.             direction = Math.atan2(-x, -y);
    2055.         }
    2056.         return {tilt: tilt, direction: direction};
    2057.     };
    2058. }
    2059. // New Function by Eliaquim
    2060. EliUCHU.hideall = function () {
    2061.     // Btn_hide = true;
    2062.     DirPadOp=true;
    2063.     okOp=true;
    2064.     cancelOp=true;
    2065.     menuOp=true;
    2066.     shiftOp=true;
    2067.     pageupOP=true;
    2068.     pagedownOP=true;
    2069.     extraOp=true;
    2070.     if(PRM.visible[0]){document.getElementById("Dirpad").style.opacity = '0';}
    2071.     if(PRM.visible[1]){document.getElementById("okBtn").style.opacity = '0';}
    2072.     if(PRM.visible[2]){document.getElementById(cancelmode2).style.opacity = '0';}
    2073.     if(PRM.visible[3]){document.getElementById("menuBtn").style.opacity = '0';} // add
    2074.     if(PRM.visible[4]){document.getElementById("shiftBtn").style.opacity = '0';} // add
    2075.     if(PRM.visible[5]){document.getElementById("pageupBtn").style.opacity = '0';} // add
    2076.     if(PRM.visible[6]){document.getElementById("pagedownBtn").style.opacity = '0';} // add
    2077.     if(PRM.visible[7]){document.getElementById("extraBtn").style.opacity = '0';} // add
    2078. };
    2079. // New Function by Eliaquim
    2080. EliUCHU.showall = function () {
    2081.     // Btn_hide = false;
    2082.     DirPadOp=false;
    2083.     okOp=false;
    2084.     cancelOp=false;
    2085.     menuOp=false;
    2086.     shiftOp=false;
    2087.     pageupOP=false;
    2088.     pagedownOP=false;
    2089.     extraOp=false;
    2090.     if(PRM.visible[0]){document.getElementById("Dirpad").style.opacity = PRM.opacity;}
    2091.     if(PRM.visible[1]){document.getElementById("okBtn").style.opacity = PRM.opacity;}
    2092.     if(PRM.visible[2]){document.getElementById(cancelmode2).style.opacity = PRM.opacity;}
    2093.     if(PRM.visible[3]){document.getElementById("menuBtn").style.opacity = PRM.opacity;}    // add
    2094.     if(PRM.visible[4]){document.getElementById("shiftBtn").style.opacity = PRM.opacity;}    // add
    2095.     if(PRM.visible[5]){document.getElementById("pageupBtn").style.opacity = PRM.opacity;}    // add   
    2096.     if(PRM.visible[6]){document.getElementById("pagedownBtn").style.opacity = PRM.opacity;}    // add
    2097.     if(PRM.visible[7]){document.getElementById("extraBtn").style.opacity = PRM.opacity;}    // add
    2098. };
    2099. // New Function by Eliaquim - Added plugin commands.
    2100. EliUCHU.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
    2101.     Game_Interpreter.prototype.pluginCommand = function (command, args) {
    2102.     EliUCHU.Game_Interpreter_pluginCommand.call(this, command, args);
    2103.     switch(command.toLowerCase()) {
    2104.         case "hide":
    2105.             switch(args[0].toLowerCase()) {
    2106.                 case "dirpad":
    2107.                     DirPadOp = true;
    2108.                     document.getElementById("Dirpad").style.opacity = '0';
    2109.                 break;
    2110.                 case "ok":
    2111.                     okOp = true;
    2112.                     document.getElementById("okBtn").style.opacity = '0';
    2113.                 break;
    2114.                 case "cancel":
    2115.                     cancelOp = true;
    2116.                     document.getElementById(cancelmode2).style.opacity = '0';
    2117.                 break;
    2118.                 case "menu":
    2119.                     menuOp = true;
    2120.                     document.getElementById("menuBtn").style.opacity = '0';
    2121.                 break;
    2122.                 case "shift":
    2123.                     shiftOp = true;
    2124.                     document.getElementById("shiftBtn").style.opacity = '0';
    2125.                 break;   
    2126.                 case "pageup":
    2127.                     pageupOP = true;
    2128.                     document.getElementById("pageupBtn").style.opacity = '0';
    2129.                 break;
    2130.                 case "pagedown":
    2131.                     pagedownOP = true;
    2132.                     document.getElementById("pagedownBtn").style.opacity = '0';
    2133.                 break;
    2134.                 case "extra":
    2135.                     extraOp = true;
    2136.                     document.getElementById("extraBtn").style.opacity = '0';
    2137.                 break;
    2138.                 case "all":
    2139.                     EliUCHU.hideall();
    2140.                 break;
    2141.             }
    2142.         break;
    2143.         case "show":
    2144.                 switch(args[0].toLowerCase()) {
    2145.                     case "dirpad":
    2146.                         DirPadOp = false;
    2147.                         document.getElementById("Dirpad").style.opacity = PRM.opacity;
    2148.                     break;
    2149.                     case "ok":
    2150.                         okOp = false;
    2151.                         document.getElementById("okBtn").style.opacity = PRM.opacity;
    2152.                     break;
    2153.                     case "cancel":
    2154.                         cancelOp = false;
    2155.                         document.getElementById(cancelmode2).style.opacity = PRM.opacity;
    2156.                     break;
    2157.                     case "menu":
    2158.                         menuOp = false;
    2159.                         document.getElementById("menuBtn").style.opacity = PRM.opacity;
    2160.                     break;
    2161.                     case "shift":
    2162.                         shiftOp = false;
    2163.                         document.getElementById("shiftBtn").style.opacity = PRM.opacity;
    2164.                     break;   
    2165.                     case "pageup":
    2166.                         pageupOP = false;
    2167.                         document.getElementById("pageupBtn").style.opacity = PRM.opacity;
    2168.                     break;
    2169.                     case "pagedown":
    2170.                         pagedownOP = false;
    2171.                         document.getElementById("pagedownBtn").style.opacity = PRM.opacity;
    2172.                     break;
    2173.                     case "extra":
    2174.                         extraOp = false;
    2175.                         document.getElementById("extraBtn").style.opacity = PRM.opacity;
    2176.                     break;
    2177.                     case "all":
    2178.                         EliUCHU.showall();
    2179.                 }
    2180.         break;
    2181.     }
    2182. };
    2183. })(UCHU_MobileOperation_Modified_Ext);
    复制代码




    本贴来自国际rpgmaker官方论坛作者:Eliaquim处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/uchu_mobileoperation_modified_ext.115020/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 10:43 , Processed in 0.143444 second(s), 57 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表