Save-Point
Message Window Trouble - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Message Window Trouble (/thread-353.html)



Message Window Trouble - afters - 04-09-2010

This feels like a stupid question for someone who could consider himself a 6 or 7 out of 10 in scripting ability, but it's pissing me off and I need some help.

I'm working on a custom message system, and I'm using a slightly smaller font than the default. The problem I'm having is that the padding around the text in the message window is disproportionately large. How do I reduce this padding? I have tired various things with the bitmap and text properties, but all of them either do nothing or have unexpected negative consequences, like making random arrows appear on the right side of my window.

Any help on this would be appreciated.


Message Window Trouble - vgvgf - 04-13-2010

There is an automatic 16 px padding between the window borders and the contents. If you want that the contents of the window be over these 16 px of padding, you can use a Sprite for that.

For example, if you want only 8 px padding, you can do something like:
Code:
window = Window_Base.new(0, 0, 128, 128)
sprite_contents = Sprite.new
sprite_contents.bitmap = Bitmap.new(window.width- 16, window.height - 16)
sprite_contents.x = window.x + 8
sprite_contents.y = window.y + 8
So, this new sprite should replace your window.contents bitmap.