I'm trying to make the MZ Button Style Interface for MV.
I am trying to replicate the interface style of Rpg Maker MZ, where Window_Selectable looks very good with tight buttons, being more friendly for a mobile conversion.
I noticed that in the MV, you create a Background behind each Rect, where that background will always be behind the information. I got good results in the Menu Interface in general.
However, in the Actors Status window in the Battle Scene , the background ends up over the information for some reason.
In the combat window the bug is more visible, as the background is alternating its position whenever it enters an actor's combat turn.
The changes I made were directly in Window Selectable, where I added and modified the following lines:
What could this problem be? It remains even when I don't use any plugin.
I am trying to replicate the interface style of Rpg Maker MZ, where Window_Selectable looks very good with tight buttons, being more friendly for a mobile conversion.
I noticed that in the MV, you create a Background behind each Rect, where that background will always be behind the information. I got good results in the Menu Interface in general.
However, in the Actors Status window in the Battle Scene , the background ends up over the information for some reason.
In the combat window the bug is more visible, as the background is alternating its position whenever it enters an actor's combat turn.
JavaScript:
Window_Selectable.prototype.drawAllItems = function() {
var topIndex = this.topIndex();
for (var i = 0; i < this.maxPageItems(); i++) {
var index = topIndex + i;
if (index < this.maxItems()) {
this.drawItemBackground(index);
this.drawItem(index);
}
}
};
Window_Selectable.prototype.drawItem = function(index) {
};
Window_Selectable.prototype.clearItem = function(index) {
var rect = this.itemRect(index);
this.contents.clearRect(rect.x, rect.y, rect.width, rect.height);
};
Window_Selectable.prototype.drawItemBackground = function(index) {
var rect = this.itemRect(index);
this.drawBackgroundRect(rect);
};
Window_Selectable.prototype.drawBackgroundRect = function(rect) {
var c1 = 'ffffff';
var c2 = '000000';
var x = rect.x;
var y = rect.y;
var w = rect.width;
var h = rect.height;
this.contents.paintOpacity = 64;
this.contents.fillRect(x+2, y+2, w-4, h-4, c1);
this.contents.paintOpacity = 64;
this.contents.fillRect(x+3, y+3, w-6, h-6, c2, c2, true);
};
Window_Selectable.prototype.redrawItem = function(index) {
if (index >= 0) {
this.clearItem(index);
this.drawItemBackground(index);
this.drawItem(index);
}
};
Window_Selectable.prototype.redrawCurrentItem = function() {
this.redrawItem(this.index());
};
Window_Selectable.prototype.refresh = function() {
if (this.contents) {
this.contents.clear();
this.drawAllItems();
}
};
What could this problem be? It remains even when I don't use any plugin.