Hi everyone,
I have add an custom window on map, i wonder how to fill it with a solid color and hide the window skin?
(so only a colored rectangle are showing instead of a window filled with color)
=D thank you very much
You probably try to use it before creating the content. Can you show your custom window's code?
Did you put the "" around the rgba()? Like: "rgba(255, 255, 0, 1)"
If it still doesn't work, can you copy/paste your code for the My_Window object?
Yeah, the content isn't being created because your window is too small. It needs to be more than 36 in both width and height.
By default, the content starts 18 pixel off every edge, making the window's content in reality 36 pixels less in width and height than the window itself.
this.contents.fillRect draws a rectangle, but insides the content, which in this case wasn't create due to having negative width and height value. So it couldn't draw anything.
The solution would be to have a window bigger than 36, and remove 18 from the x and y axis to draw your rectangle at the position you want:
Window_Base.prototype.call(this, x - 18, y - 18, 41, 41);
Ah thank you = D i was wondering why is that
So everything is working as intended now?