SRD Window Skin Option + Yanfly Options Core

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
794
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,357
Reaction score
1,517
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,116
Reaction score
794
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,159
Reaction score
709
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 Profile Posts

Working on Zelda-like tileset. Should be greatly refined. And tonight extra pave tiles, outward corners, abyss and water...
Is it possible to move posts from the in-progress project forum to completed games? I think I need to message a mod but a bit worried about bothering them
Bleeding Moons has its release date: September 3rd!
Do you stick with the RM default, or set a custom one?

Forum statistics

Threads
100,539
Messages
976,985
Members
132,081
Latest member
Kaezyelnatz
Top