I was adding a custom difficulty option to my game that made use of gauges, and I reused the audio code from Yanfly's option core in an attempt to make it easier on myself, but for some reason, instead of displaying the value of the current % like the audio settings, it instead displays "off" when the gauge is completely empty, or "On" when it's partially or fully filled. as seen below
while the option itself still functions properly, this is still annoying and I would like some help with this. below is the information/code for this option, if anyone knows how I messed up, please inform me so I can fix it.
Also, while not part of my issue, i would also like some help changing how much the gauge increments when inputting left/right/ok. currently, it increments by 10, but I would like it to increment by 5. This would actually be useful for the other gauges in the options menu, but this one is the one I believe it's most important for.
while the option itself still functions properly, this is still annoying and I would like some help with this. below is the information/code for this option, if anyone knows how I messed up, please inform me so I can fix it.
JavaScript:
//Symbol
CostOfRetry
//show/hide
show = true;
//Enable
enabled = true;
//Ext
ext = 0;
//Make option code
this.addCommand(name, symbol, enabled, ext);
//Draw option code
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var titleWidth = rect.width - statusWidth;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
var value = this.getConfigValue(symbol);
var rate = value / 100;
var gaugeColor1 = this.textColor(3);
var gaugeColor2 = this.textColor(11);
this.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);
this.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');
//Process ok code
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += this.volumeOffset();
if (value > 100) {
value = 0;
}
value = value.clamp(0, 100);
this.changeValue(symbol, value);
$gameVariables.setValue(113, value);
//process right code
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
var index = value;
value += this.volumeOffset();
value = value.clamp(0, 100);
this.changeValue(symbol, value);
$gameVariables.setValue(113, value);
//process left code
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= this.volumeOffset();
value = value.clamp(0, 100);
this.changeValue(symbol, value);
$gameVariables.setValue(113, value);
//default config code
ConfigManager[symbol] = 50;
//save config code
config[symbol] = ConfigManager[symbol];
//load config code
var value = config[symbol];
if (value !== undefined) {
ConfigManager[symbol] = Number(value).clamp(0, 100);
} else {
ConfigManager[symbol] = 100;
}
Also, while not part of my issue, i would also like some help changing how much the gauge increments when inputting left/right/ok. currently, it increments by 10, but I would like it to increment by 5. This would actually be useful for the other gauges in the options menu, but this one is the one I believe it's most important for.