Choice Window Text Align

● ARCHIVED · READ-ONLY
Started by KrispyTheKorn 4 posts View original ↗
  1. 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.

    Spoiler
    http://media.moddb.com/images/members/1/93/92492/Screenshot_Bridge_Choice.png
    And here is my current Window_Choice script (it's a mess so beware).

    Spoiler
    #==============================================================================# ** 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!
  2. 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.
  3. Thanks mate, that worked perfectly! And thanks for the compliment too :)


    This thread can be closed now.
  4. 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.