From 7840c69342d68451f45eaee949b826852251b59b Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Sat, 3 Feb 2024 14:33:31 +0300 Subject: [PATCH] PIXI Controls: Move buttonsScale parameter to plugins.js --- www.rus/js/plugins.js | 3 ++- www.rus/js/plugins/VND_ONSControls.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/www.rus/js/plugins.js b/www.rus/js/plugins.js index 971677b..2bc34c5 100644 --- a/www.rus/js/plugins.js +++ b/www.rus/js/plugins.js @@ -4238,7 +4238,8 @@ var $plugins = [ { "zIndex": 1488, "gamepadId": "Xbox Wireless Controller (STANDARD GAMEPAD Vendor: 045e Product: 02e0)", - "gamepadIndex": 0 + "gamepadIndex": 0, + "buttonsScale": 1.2 } }, diff --git a/www.rus/js/plugins/VND_ONSControls.js b/www.rus/js/plugins/VND_ONSControls.js index 1947904..8618575 100644 --- a/www.rus/js/plugins/VND_ONSControls.js +++ b/www.rus/js/plugins/VND_ONSControls.js @@ -388,7 +388,7 @@ ONSControls.configManager = function() { // * Class Variables //============================================================================= ConfigManager.ONSConfig ||= {}; -ConfigManager.ONSConfig.buttonsScale ||= 1; +ConfigManager.ONSConfig.buttonsScale ||= this.options.buttonsScale; ConfigManager.ONSConfig.controlsOffsetX ||= 32; ConfigManager.ONSConfig.controlsOffsetY ||= 16; ConfigManager.ONSConfig.buttonsSize ||= ONSControls._controlsCanvas.vh(0.18) * ConfigManager.ONSConfig.buttonsScale; @@ -492,7 +492,7 @@ ConfigManager.restoreDefaultConfig = function () { var base = path.dirname(process.mainModule.filename); base = path.join(base, 'save/'); if (fs.existsSync(base + "config.rpgsave")) { fs.unlinkSync(base + "config.rpgsave"); } - ConfigManager.ONSConfig.buttonsScale = 1; + ConfigManager.ONSConfig.buttonsScale = this.options.buttonsScale; ConfigManager.ONSConfig.controlsOffsetX = 32; ConfigManager.ONSConfig.controlsOffsetY = 16; ConfigManager.ONSConfig.buttonsSize = ONSControls._controlsCanvas.vh(0.18) * ConfigManager.ONSConfig.buttonsScale;