Window/Text Padding

Pie4aPie

Developer/Artist
Veteran
Joined
Jan 10, 2013
Messages
65
Reaction score
6
First Language
English
APP_WindowPadding v1.0
by: AppointedPie


 

Introduction
A small script that allows you to enter custom values for the Global settings for Line Height, and Window Padding. These functions already exist in YEP_CoreEngine, so if you are using that, it is unnecessary. If you prefer this lightweight version of just these settings, then this is for you.

 

Features
- Adjust the system setting for Line Height. Decreases the spacing between lines. You should adjust this to tighten up the look of your windows if you choose a font smaller than the default.
- Adjust the system setting for Window Padding. This is the distance from your text to the edge of the window. Adjust this if you want more or less space between window borders and text inside.

 

Screenshots

Here's a screenshot of how the spacing is effected when you use smaller fonts.

 



 

and here's what it can look like after using the script...

 



 

here's what it looks like.

 



 

Code (copy and paste into the JavaScript editor of your choice)

 

Pastebin

or copy and paste from below.

//=============================================================================// AppointedPie - Window Padding// APP_WindowPadding.js//============================================================================= var Imported = Imported || {};Imported.APP_WindowPadding = true; var AppointedPie = AppointedPie || {};AppointedPie.WindowPadding = AppointedPie.WindowPadding || {}; //=============================================================================/*: * @plugindesc v1.0 Additional parameter changes to the core systems of RPG Maker MV * @author AppointedPie * * @param ----Window---- * @default * * @param Line Height * @desc Adjusts the Line Height system default. * Default: 36 * @default 30 * * @param Window Padding * @desc Adjusts the window padding system default. * Default: 18 * @default 10 * * @param Text Padding * @desc Adjusts the text padding system default. * Default: 6 * @default 2 * *///=============================================================================// Parameter Variables//============================================================================= AppointedPie.Parameters = PluginManager.parameters('APP_WindowPadding');AppointedPie.Param = AppointedPie.Param || {}; AppointedPie.Param.LineHeight = Number(AppointedPie.Parameters['Line Height']);AppointedPie.Param.WinPad = Number(AppointedPie.Parameters['Window Padding']);AppointedPie.Param.TextPad = Number(AppointedPie.Parameters['Text Padding']); //-----------------------------------------------------------------------------Window_Base.prototype.lineHeight = function() {    return AppointedPie.Param.LineHeight;}; Window_Base.prototype.standardPadding = function() {    return AppointedPie.Param.WinPad}; Window_Base.prototype.textPadding = function() {    return AppointedPie.Param.TextPad}; Window_Base.prototype.updatePadding = function() {    this.padding = this.standardPadding();};//=============================================================================// End of File//=============================================================================  

 

 

Credit
- AppointedPie

 

Author's Notes
This script may be used freely for both personal and commercial purposes. Thanks and have fun!!

 
Last edited by a moderator:

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Please put this into a pre-compiled .js file. It's not meant to be slapped into a text editor.
 

Pie4aPie

Developer/Artist
Veteran
Joined
Jan 10, 2013
Messages
65
Reaction score
6
First Language
English
Sure it is! Notepad++, Komodo Edit, hell even regular old Notepad will have no trouble with it. Save as .js in your Plugins folder and away you go. You will need tools like these to work on scripts anyways. IMHO a developer should want to inspect every line of every script in your game, as well as know how to edit it and manage where it's located.​

If all you use is notepad, just save as, then change the format to Unicode and change the extension to .js and you are all set.

However, if folks are more comfortable with it, I have added a Pastebin link.
 

Niisi

Warper
Member
Joined
Aug 30, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Oh dear... I replied to the wrong thread ^^''
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

--Turn Based Battles--

Hero:
Look, it is Minotaur!
M. Knight: Let's go attack it!
Hero: Wait, no, it is just standing there!!
HUD Display: It is M. Knight's turn.
(M. Knight attacks Minotaur)
HUD Display: It is Minotaur's turn.
Hero: (Facepalms) Now look what you did! You made the Minotaur attack us!
Randomly deciding to create some tombs/sarcophagi last minute is probably not the best choice in a timed game jam...
There are only a few days left in our Spooktober Spooktacular Game Jam! Hope you are working hard to get your game in!
Where do i have to play Heisei Pistol Show the same creator that made Re: Kinder Parun
I really get the feeling I should be doing regular YouTube videos whenever I make something cool in my game, instead of waiting for massive changes. But not going to lie... I always feel like it's never quite enough to merit an update, until it's a drastic change. :kaoswt:

Forum statistics

Threads
104,558
Messages
1,007,127
Members
136,040
Latest member
Nicoh
Top