Independient Window Padding Value?

Hello again, I wanted to publish this a few years ago, but now I can finally publish it, it is a problem and I have doubts.

To get started, in Window_Base on line 35, there is something called "standard_padding" which is the limit of the window border in RPG Maker.
This parameter generally applies to all sides of the window, more or less like this:
Padding4.png

Padding1.png

As you can see, since it is in 12 it applies the border of 12 to all its sides, if it is modified to another value it would be something like this:
(example value 35)

Padding2.png


The problem with this is that I don't want the padding of all its sides to be modified with the same value.
if not, that each of the edges have an independent value, something like this:
Padding5.png


Padding3.png


Could it be possible that each edge has an independent value?
It really is a problem, I have been searching but I have not found any answer, and I would like to see if it is possible to make such that modification to the window.

Thanks to everyone beforehand.
I guess it depends on what you're trying to do. Are you just wanting to alter the area where text is drawn (i.e. the contents bitmap)?
I guess it depends on what you're trying to do. Are you just wanting to alter the area where text is drawn (i.e. the contents bitmap)?
Yes, more than anything to modify the separation between the borders and the content.
When you're drawing the text, you could do something like this:
Ruby:
rect = contents.rect
rect.x = left_padding
rect.y = top_padding
rect.width = width - (left_padding + right_padding)
rect.height = height - (top_padding + bottom_padding)
draw_text(rect, text)

You might have to set the window's standard_padding to 0 for it work properly.
When you're drawing the text, you could do something like this:
Ruby:
rect = contents.rect
rect.x = left_padding
rect.y = top_padding
rect.width = width - (left_padding + right_padding)
rect.height = height - (top_padding + bottom_padding)
draw_text(rect, text)

You might have to set the window's standard_padding to 0 for it work properly.
oh, it works great for texts, but not for elections, i thought it would work generally (for all window of Windows_Base) equally thanks.
Why do you want to change it for every window? The problem is that multiple windows inherit from Window_Base and changing it there could cause issues for other scripts. Rather than changing the shape of the contents bitmap, it's probably better to just draw things where you want them to go.
Why do you want to change it for every window? The problem is that multiple windows inherit from Window_Base and changing it there could cause issues for other scripts. Rather than changing the shape of the contents bitmap, it's probably better to just draw things where you want them to go.
you're right... I also found that the padding choices are in Window_Selectable in item_rect (index) and item_rect_for_text (index).
all the paddings could be modified now. Thanks to the code you have given, it helped me to modify it as I wanted, thanks you c:

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/independient-window-padding-value.121439/