Moving a Text Box!

SeniorSlime (SK)

Sonic Kaboom
Member
Joined
Aug 14, 2016
Messages
22
Reaction score
2
First Language
English
Primarily Uses
Hey everybody,


I'm back here again with another question.


Could someone please provide me with a script (or script source) on how to move the title screen text box?
I mean like the text box on the title screen where you can choose between options.


I want to move it to the side because it's in the way of my picture.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,238
Reaction score
6,783
First Language
German
Primarily Uses
RMMV
I've moved this thread to Ace Script Request. Please be sure to post your threads in the correct forum next time. Thank you.


Scripts is for presenting scripts you wrote yourself (which is why it's moderated, your topic would have been automatically visible in requests)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,546
Reaction score
12,061
First Language
English
Primarily Uses
RMMV
Find your script called Window_TitleCommand, then look for this method:

Code:
  #--------------------------------------------------------------------------
  # * Update Window Position
  #--------------------------------------------------------------------------
  def update_placement
    self.x = (Graphics.width - width) / 2
    self.y = (Graphics.height * 1.6 - height) / 2
  end


Just change the formula that calculates the x and y positions so it's placed where you want it to go (the top left corner will be at the coordinates you specify):

Code:
  #--------------------------------------------------------------------------
  # * Update Window Position
  #--------------------------------------------------------------------------
  def update_placement
    self.x = 80
    self.y = 250
  end
You can either muck around a bit to get the numbers right (might take a while), or you could do a bit of extra work, and get the numbers right first time around:


Just test play and when the title screen comes up, take a screenshot.


Open up an image editing program (Photoshop if you have it, or GIMP, or Paint.net is what I use) and create a new image with your screenshot.  Crop it to remove any window borders and title bar.


Select the whole command box, including the background and borders.  Use the move tool to move it around so it's where you want it to be.  Somewhere on the status bar, you should see the x/y coordinate of the top left corner of the box you're moving.  


When it's at the right spot, make a note of that x and y position, and use it in the script above.


You might just change it to something like this, to move it over to the left or the right, but keep it where it is vertically:

Code:
  #--------------------------------------------------------------------------
  # * Update Window Position
  #--------------------------------------------------------------------------
  def update_placement
    self.x = Graphics.width - width - standard_padding # to go on the right side
    # or
    self.x = standard_padding # to go on the left side
    self.y = (Graphics.height * 1.6 - height) / 2
  end
 
Last edited by a moderator:

XxMETALxX

Warper
Member
Joined
May 14, 2017
Messages
1
Reaction score
0
First Language
dutch
Primarily Uses
RMVXA
wow, this helped me a lot! :p
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Trading has been halted on the TSX (Canadian stock market) because of "technical issues". Suspicious... I'm bracing myself for a sea of red tomorrow lol
The Loco-Motion song pre-dates the dance. Meaning the lyrics are kinda misleading. "Everybody's doing a brand new dance now"... No they weren't, you just used peer pressure to trick everyone into going along with it.
Love it when someone confuses "RPG Maker (or script/plugin) has a bug" with "I didn't set it up right and it's not working as I want (or gives an error)"
Is animation really as hard as I think it is?
Out of sudden, snow. Everywhere.

Forum statistics

Threads
94,579
Messages
922,036
Members
124,443
Latest member
Tetragrammaton
Top