- Joined
- Sep 20, 2016
- Messages
- 16
- Reaction score
- 4
- First Language
- Spanish
- Primarily Uses
Hello everyone! You see, I'm creating a visual interface for Skills in combat, and the cursor is Square (Normal), so I copied the original Window Skin, saved a duplicate (but edited it to be a circle), then it occurred to me that at select a Skill, the windowskin will change according to that circle but for the other choices it will remain the same as the original, I attach the code of what I have been trying to do and photos of what the comparison looks like.
I thank you in advance for your help.
I thank you in advance for your help.
JavaScript:
Window_SkillList.prototype.drawItem = function(index) {
if (index < 4) var skill = this._data[index];
if (skill) {
//var costWidth = this.costWidth();
var rect = this.itemRect(index);
rect.width -= this.textPadding();
switch (this._actor.getColorSkillSlot(index)) {
case "R":
var colorindex = 0;
this.drawApCost(skill,rect.x + 14,rect.y + rect.height - 58,rect.width);
this.drawSkillCost(skill, rect.x + 35, rect.y+rect.height / 2-26, rect.width, 'right');
break;
case "G":
var colorindex = 1;
this.drawApCost(skill,rect.x + 20,rect.y + rect.height - 66,rect.width);
this.drawSkillCost(skill, rect.x + 24, rect.y+rect.height / 2-35, rect.width, 'right');
break;
case "B":
var colorindex = 2;
this.drawApCost(skill,rect.x + 15,rect.y + rect.height - 65,rect.width);
this.drawSkillCost(skill, rect.x + 30, rect.y+rect.height / 2-34, rect.width, 'right');
break;
case "":
var colorindex = 3;
break;
var color = this._actor.SlotColor(index);
if (color = 1) {
this.windowskin = ImageManager.loadSystem("Window - round");
this._scene._windowLayer.refreshWindowskins();
} else {
this.windowskin = ImageManager.loadSystem("Window");
};
};