diff --git a/www.eng/js/plugins/VND_ONSControls.js b/www.eng/js/plugins/VND_ONSControls.js index 779dc37..18865fb 100644 --- a/www.eng/js/plugins/VND_ONSControls.js +++ b/www.eng/js/plugins/VND_ONSControls.js @@ -836,9 +836,9 @@ Window_OmoMenuOptionsONSControls.prototype.makeOptionsList = function () { // Get Text //var text = LanguageManager.getPluginText('optionsMenu', 'audio'); var text = { - buttonsScale: {help: "Change on-screen controls scale.", text: "CONTROLS SCALE", isBar: true, persent: true, minValue: 0, maxValue: 500}, - buttonsOpacity: {help: "Change on-screen controls opacity.", text: "CONTROLS OPACITY", isBar: true, persent: true, minValue: 0, maxValue: 100}, - safeArea: {help: "Change safe area size for on-screen controls.", text: "SAFE AREA", isBar: true, persent: true, minValue: 10, maxValue: 100}, + buttonsScale: {help: "Change on-screen controls scale.", text: "CONTROLS SCALE", isBar: true, minValue: 0, maxValue: 500}, + buttonsOpacity: {help: "Change on-screen controls opacity.", text: "CONTROLS OPACITY", isBar: true, minValue: 0, maxValue: 100}, + safeArea: {help: "Change safe area size for on-screen controls.", text: "SAFE AREA", isBar: true, minValue: 10, maxValue: 100}, editMenu: {help: "Press Left or Right button on DPad, to open menu.", text: "OPEN EDIT MODE", isBar: false} } // Get Config @@ -855,11 +855,7 @@ Window_OmoMenuOptionsONSControls.prototype.makeOptionsList = function () { var data = text[name]; // Add Option if (data.isBar) { - if (data.persent) { - this._optionsList.push({ header: data.text + ':', config: name, option: ConfigManager.ONSConfig[name] * 100, helpText: data.help, isBar: data.isBar, persent: data.persent, minValue: data.minValue, maxValue: data.maxValue }); - } else { - this._optionsList.push({ header: data.text + ':', config: name, option: ConfigManager.ONSConfig[name], helpText: data.help, isBar: data.isBar, persent: data.persent, minValue: data.minValue, maxValue: data.maxValue }); - } + this._optionsList.push({ header: data.text + ':', config: name, option: ConfigManager.ONSConfig[name] * 100, helpText: data.help, isBar: data.isBar, minValue: data.minValue, maxValue: data.maxValue }); } else { this._optionsList.push({ header: data.text, config: name, helpText: data.help, isBar: data.isBar}); } @@ -879,7 +875,7 @@ Window_OmoMenuOptionsONSControls.prototype.drawItem = function (index) { this.contents.drawText(data.header, rect.x + 50, rect.y, rect.width, 24); // Update option bar if (data.isBar) { - this.updateOptionBar(index, data.option, data.persent); + this.updateOptionBar(index, data.option); } }; }; @@ -907,7 +903,7 @@ Window_OmoMenuOptionsONSControls.prototype.cursorRight = function (wrap) { var rate = Input.isLongPressed('right') ? 5 : 5 data.option = Math.min(data.option + rate, data.maxValue); if (data.isBar) { - this.updateOptionBar(this.index(), data.option, data.persent); + this.updateOptionBar(this.index(), data.option); } else { ONSControls.openEditMode(); } @@ -926,7 +922,7 @@ Window_OmoMenuOptionsONSControls.prototype.cursorLeft = function (wrap) { var rate = Input.isLongPressed('left') ? 5 : 5 data.option = Math.max(data.option - rate, data.minValue); if (data.isBar) { - this.updateOptionBar(this.index(), data.option, data.persent); + this.updateOptionBar(this.index(), data.option); } else { ONSControls.openEditMode(); } @@ -935,7 +931,7 @@ Window_OmoMenuOptionsONSControls.prototype.cursorLeft = function (wrap) { //============================================================================= // * Update option bar //============================================================================= -Window_OmoMenuOptionsONSControls.prototype.updateOptionBar = function (index, option, persent) { +Window_OmoMenuOptionsONSControls.prototype.updateOptionBar = function (index, option) { // Get Data var data = this._optionsList[index]; // Get Back and Front Sprite @@ -946,15 +942,9 @@ Window_OmoMenuOptionsONSControls.prototype.updateOptionBar = function (index, op var rect = this.itemRect(index); rect.x += 415; rect.y += 27; rect.width = 100; rect.height = 40; this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); - if (persent) { - this.contents.drawText(option + '%', rect.x, rect.y, rect.width, rect.height, 'right'); - // Set Option - ConfigManager.ONSConfig[data.config] = option / 100; - } else { - this.contents.drawText(Math.round(option) + 'px', rect.x, rect.y, rect.width, rect.height, 'right'); - // Set Option - ConfigManager.ONSConfig[data.config] = option; - } + this.contents.drawText(Math.round(option) + '%', rect.x, rect.y, rect.width, rect.height, 'right'); + // Set Option + ConfigManager.ONSConfig[data.config] = option / 100; ConfigManager.ONSConfig.updateData(); }; //============================================================================= diff --git a/www.rus/js/plugins/VND_ONSControls.js b/www.rus/js/plugins/VND_ONSControls.js index 8c804dd..0584a0c 100644 --- a/www.rus/js/plugins/VND_ONSControls.js +++ b/www.rus/js/plugins/VND_ONSControls.js @@ -836,9 +836,9 @@ Window_OmoMenuOptionsONSControls.prototype.makeOptionsList = function () { // Get Text //var text = LanguageManager.getPluginText('optionsMenu', 'audio'); var text = { - buttonsScale: {help: "Изменить размер наэкранных кнопок управления.", text: "РАЗМЕР УПРАВЛЕНИЯ", isBar: true, persent: true, minValue: 0, maxValue: 500}, - buttonsOpacity: {help: "Изменить прозрачность наэкранных кнопок управления.", text: "ПРОЗРАЧНОСТЬ УПРАВЛЕНИЯ", isBar: true, persent: true, minValue: 0, maxValue: 100}, - safeArea: {help: "Изменить размер безопасной области для управления.", text: "БЕЗОПАСНАЯ ОБЛАСТЬ", isBar: true, persent: true, minValue: 10, maxValue: 100}, + buttonsScale: {help: "Изменить размер наэкранных кнопок управления.", text: "РАЗМЕР УПРАВЛЕНИЯ", isBar: true, minValue: 0, maxValue: 500}, + buttonsOpacity: {help: "Изменить прозрачность наэкранных кнопок управления.", text: "ПРОЗРАЧНОСТЬ УПРАВЛЕНИЯ", isBar: true, minValue: 0, maxValue: 100}, + safeArea: {help: "Изменить размер безопасной области для управления.", text: "БЕЗОПАСНАЯ ОБЛАСТЬ", isBar: true, minValue: 10, maxValue: 100}, editMenu: {help: "Нажмите кнопку влево или вправо, чтобы открыть меню.", text: "ОТКРЫТЬ МЕНЮ НАСТРОЕК", isBar: false} } // Get Config @@ -855,11 +855,7 @@ Window_OmoMenuOptionsONSControls.prototype.makeOptionsList = function () { var data = text[name]; // Add Option if (data.isBar) { - if (data.persent) { - this._optionsList.push({ header: data.text + ':', config: name, option: ConfigManager.ONSConfig[name] * 100, helpText: data.help, isBar: data.isBar, persent: data.persent, minValue: data.minValue, maxValue: data.maxValue }); - } else { - this._optionsList.push({ header: data.text + ':', config: name, option: ConfigManager.ONSConfig[name], helpText: data.help, isBar: data.isBar, persent: data.persent, minValue: data.minValue, maxValue: data.maxValue }); - } + this._optionsList.push({ header: data.text + ':', config: name, option: ConfigManager.ONSConfig[name] * 100, helpText: data.help, isBar: data.isBar, minValue: data.minValue, maxValue: data.maxValue }); } else { this._optionsList.push({ header: data.text, config: name, helpText: data.help, isBar: data.isBar}); } @@ -879,7 +875,7 @@ Window_OmoMenuOptionsONSControls.prototype.drawItem = function (index) { this.contents.drawText(data.header, rect.x + 50, rect.y, rect.width, 24); // Update option bar if (data.isBar) { - this.updateOptionBar(index, data.option, data.persent); + this.updateOptionBar(index, data.option); } }; }; @@ -907,7 +903,7 @@ Window_OmoMenuOptionsONSControls.prototype.cursorRight = function (wrap) { var rate = Input.isLongPressed('right') ? 5 : 5 data.option = Math.min(data.option + rate, data.maxValue); if (data.isBar) { - this.updateOptionBar(this.index(), data.option, data.persent); + this.updateOptionBar(this.index(), data.option); } else { ONSControls.openEditMode(); } @@ -926,7 +922,7 @@ Window_OmoMenuOptionsONSControls.prototype.cursorLeft = function (wrap) { var rate = Input.isLongPressed('left') ? 5 : 5 data.option = Math.max(data.option - rate, data.minValue); if (data.isBar) { - this.updateOptionBar(this.index(), data.option, data.persent); + this.updateOptionBar(this.index(), data.option); } else { ONSControls.openEditMode(); } @@ -935,7 +931,7 @@ Window_OmoMenuOptionsONSControls.prototype.cursorLeft = function (wrap) { //============================================================================= // * Update option bar //============================================================================= -Window_OmoMenuOptionsONSControls.prototype.updateOptionBar = function (index, option, persent) { +Window_OmoMenuOptionsONSControls.prototype.updateOptionBar = function (index, option) { // Get Data var data = this._optionsList[index]; // Get Back and Front Sprite @@ -946,15 +942,9 @@ Window_OmoMenuOptionsONSControls.prototype.updateOptionBar = function (index, op var rect = this.itemRect(index); rect.x += 415; rect.y += 27; rect.width = 100; rect.height = 40; this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); - if (persent) { - this.contents.drawText(option + '%', rect.x, rect.y, rect.width, rect.height, 'right'); - // Set Option - ConfigManager.ONSConfig[data.config] = option / 100; - } else { - this.contents.drawText(Math.round(option) + 'px', rect.x, rect.y, rect.width, rect.height, 'right'); - // Set Option - ConfigManager.ONSConfig[data.config] = option; - } + this.contents.drawText(Math.round(option) + '%', rect.x, rect.y, rect.width, rect.height, 'right'); + // Set Option + ConfigManager.ONSConfig[data.config] = option / 100; ConfigManager.ONSConfig.updateData(); }; //=============================================================================