Choice Window Text Align

Status
Not open for further replies.

KrispyTheKorn

Villager
Member
Joined
May 25, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Hi everyone I'm KrispyTheKorn, long time reader, first time asking for help ... erm guy. I've searched the forums extensively as well as done a lot of Google searching, but I've come up against a bit of an obstacle and I require some help in order to proceed.

As the title suggests I'm trying to align the Choices window text to the center of the window but I have been unable to find any way to force it. I noticed that Yanfly's menu engine has the options to center the text in the main menu, the in game menu and the battle menu but alas, it doesn't effect the choices menu. Could someone point me in the right direction?

Provided the image works, here's how it currently looks. It's not bad, but feel it would be cleaner if the text were centered.

And here is my current Window_Choice script (it's a mess so beware).

#==============================================================================# ** Window_ChoiceList#------------------------------------------------------------------------------# This window is used for the event command [Show Choices].#==============================================================================class Window_ChoiceList < Window_Command #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(message_window) @message_window = message_window super(0, 0) self.openness = 0 deactivate end #-------------------------------------------------------------------------- # * Start Input Processing #-------------------------------------------------------------------------- def start update_placement refresh select(0) open activate end #-------------------------------------------------------------------------- # * Update Window Position #-------------------------------------------------------------------------- def update_placement self.width = [max_choice_width + 12, 300].max + padding * 2# self.width = [max_choice_width + 12, 96].max + padding * 2 self.width = [width, Graphics.width].min self.height = fitting_height($game_message.choices.size)## # Izzy 1 # Allows positioning of the Choice Window to# Any position on the x plane# self.x = 350#### Izzy 2 # Enabling this instead of the above line of# code will align the choice box to the right## self.x = Graphics.width - width## ## Izzy 3 # Enabling this instead of the above line of# will align the choice box to the left## self.x = width - width### if @message_window.y >= Graphics.height / 2 self.y = @message_window.y - height# # Izzy Window position here >>> #self.y = 360# else self.y = @message_window.y + @message_window.height end end
I'm using RPG Maker VXAce. Thank you for your time and apologies if I have posted this in the wrong area of the forum!
 
Last edited by a moderator:

♥SOURCE♥

Too sexy for your party.
Veteran
Joined
Mar 14, 2012
Messages
693
Reaction score
411
Primarily Uses
Try replacing it for this: 

#==============================================================================# ** Window_ChoiceList#------------------------------------------------------------------------------# This window is used for the event command [Show Choices].#==============================================================================class Window_ChoiceList < Window_Command #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(message_window) @message_window = message_window super(0, 0) self.openness = 0 deactivate end def alignment 1 end #-------------------------------------------------------------------------- # * Start Input Processing #-------------------------------------------------------------------------- def start update_placement refresh select(0) open activate end #-------------------------------------------------------------------------- # * Update Window Position #-------------------------------------------------------------------------- def update_placement self.width = [max_choice_width + 12, 300].max + padding * 2# self.width = [max_choice_width + 12, 96].max + padding * 2 self.width = [width, Graphics.width].min self.height = fitting_height($game_message.choices.size)## # Izzy 1 # Allows positioning of the Choice Window to# Any position on the x plane# self.x = 350#### Izzy 2 # Enabling this instead of the above line of# code will align the choice box to the right## self.x = Graphics.width - width## ## Izzy 3 # Enabling this instead of the above line of# will align the choice box to the left## self.x = width - width### if @message_window.y >= Graphics.height / 2 self.y = @message_window.y - height# # Izzy Window position here >>> #self.y = 360# else self.y = @message_window.y + @message_window.height end end

Nice screen.
 
Last edited by a moderator:

KrispyTheKorn

Villager
Member
Joined
May 25, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Thanks mate, that worked perfectly! And thanks for the compliment too :)


This thread can be closed now.
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top