SRD Window Skin Option + Yanfly Options Core

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,114
Reaction score
787
First Language
English
Primarily Uses
RMMV
As the title suggests, I'm trying to incorporate SRD_WindowSkinOption with YEP_OptionsCore. Yanfly's plugin allows you to add extra functionality to the options menu, but I don't know how to fill it out...
options.png
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,337
Reaction score
1,495
First Language
English
Primarily Uses
RMMV
So you're trying to add an option for changing windowskin?
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,114
Reaction score
787
First Language
English
Primarily Uses
RMMV
Yes, I'm trying to access SRD's window skin changing options via Yanfly's options core.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,144
Reaction score
700
First Language
Dutch
Primarily Uses
RMMV
it was already answer somewhere, but here is the code (I save that:D )

Symbol Parameter : windowSkin and/or fontStyle (same code!)


==================
"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 / x; // change x to a number of windowskins/fontstyles
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 += 1;
if (value > x) { // change x to a number of windowskins/fontstyles
value = 0;
}
value = value.clamp(0, x); // change x to a number of windowskins/fontstyles
this.changeValue(symbol, value);


===================
"Cursor Right Code"
===================
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += 1;
value = value.clamp(0, x); // change x to a number of windowskins/fontstyles
this.changeValue(symbol, value);


===================
"Cursor Right Code"
===================
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= 1;
value = value.clamp(0, x); // change x to a number of windowskins/fontstyles
this.changeValue(symbol, value);


=====================
"Default Config Code"
=====================
ConfigManager[symbol] = 0;


==================
"Load Config Code"
==================
var value = config[symbol];
if (value !== undefined) {
ConfigManager[symbol] = Number(value).clamp(0, x); // change x to a number of windowskins/fontstyles
} else {
ConfigManager[symbol] = 0;
}
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

What does your project folder look like?
I was told that an iPhone can provide a personal internet hotspot...You learn something new everyday!
Will probably never use MZ. Buys it anyway
Been playing Star Ocean: The Last Hope, the remastered version on PS4. I like it. Seems others think it's garbage, but I like these cutesy, silly, and tropey characters. Having waaaay more fun with it than SO: Integrity and Faithlessness.

Forum statistics

Threads
100,458
Messages
976,162
Members
132,082
Latest member
nwr
Top