Jump to content
Zerbu

Message Box Size and Position Options [UPDATED]

Recommended Posts

Message Box Size and Position Options

This script allows you to set the size of a message box, and/or set it to a fixed position on the game screen.

 

NEW FEATURES:

  • You can now quickly set the variables using the function call: message_box_options(width, height, x, y), it's much easier than having to manually set all the variables one by one.
  • You can also reset the options quickly as well using message_box_options_reset

 

Preview

messageoptions.png

 

 

Instructions

Create four variables for the following settings:

  • The width of the message box
  • The height of the message box
  • The X position on the screen
  • The Y position on the screen

Next, edit the settings in the script to assign the identify what variables are used.

 

 

#--------------------------------------------------------------------------

# Options

#--------------------------------------------------------------------------

# Variable with the message width

# If the variable value is 0, the full width of the window will be used

MESSAGE_WIDTH = 2

 

# Variable with the message height

# If the variable value is 0, the default height will be used

MESSAGE_HEIGHT = 3

 

# Variable with the X position

# If the variable value is -1, it will be centred on the screen

MESSAGE_X = 4

 

# Variable with the Y position

# If the variable value is 0, the position chosen in the editor

# (Top, Middle, Bottom) will be used

MESSAGE_Y = 5

 

 

Download

Edited by Zerbu

Share this post


Link to post
Share on other sites

There's not an option for that yet, sorry. The one in the screenshot was positioned manually, sorry if there was a bit of a misunderstanding.

Share this post


Link to post
Share on other sites

I've found and fixed a bug in the script. When resetting the text box position when you changed the height of the text box, then talking to someone immediately after, the box would go out the screen. I've fixed the bug so that no longer occurs.

Share this post


Link to post
Share on other sites

Sorry for the major necropost, but I found and fixed a little bug. :)

 

On line 100 or so, replace this:

if $game_variables[5] != 0

with this:

if $game_variables[MESSAGE_Y] != 0

 

Otherwise, you will not be able to adjust the Y position of the message box when using a variable other than 5.

 

p.s. I love this script - thank you for writing it! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted