Help - Search - Members - Calendar
Full Version: Editing text padding in windows
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS
kowbrainz
I've been playing around a bit with the way the GUI appears in battle to some success, however I'd like to know how I can change the padding for the text so that it displays properly without being cut off like in the screenshot below.



Later on I'd like to make all of these windows a lot more compact towards the top of the screen so they don't cover up the enemy sprites (think Earthbound) - so working with the padding and window sizes is necessary.

I know how to change the font size, the window size and location. I've tried fiddling with the y-coordinate of the text, but it doesn't make much of a difference when the engine is using some padding in a module I don't know about. confused.gif
Jens of Zanicuud
Okay, let's spend a couple words about it.
RMXP has a built-in window class which deals with the padding. The class is not customizable (it's actually hidden and not available in the script editor) and sets a "limit" to your text. To be precise, the window contents begins at 16 px from the left corner and 16 px from the top of the window. This padding can't be edited in any way but modifying or rewriting that module.
I suggest a "way out": make the windows bigger, set their opacity to 0 (i.e. [window varaible name].opacity = 0 ) and set a background picture which simulats the window background.

If you're interested in this kind of solution, just let me know and I'll give you some hint about it.

Jens
kowbrainz
Thanks again.

I think I know what you mean, so I should be able to manage that part on my own. Though having the options in the command window line up with what's on the right might be a bit tougher.

It's a shame that it's coded like that, though.
Jens of Zanicuud
I completely agree with you. However, from what I've gathered, basic RGSS classes and modules (i.e. Window, Sprite, Bitmap, Input, Cache, Graphics) were written in a combination of C++ / Ruby, compiled and put into the DLL, so they couldn't be easily editable as well inside RMXP...

Jens
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.