[VX Ace] Centering the text displayed by Window_Help

Hi all,

Looking for a method to center align the text displayed by Window_Help. In the rest of my project, the text is centered through ATS Message Formatting, but Window_Help isn't effected by this script. The text should be aligned as per the attachment to this post.

Any addition to Window_Help itself or script to achieve this would be much appreciated
window_help uses draw_text_ex which works by character, not by whole string, same as the window_message routine.
does that script work with window_message? you may be able to jury-rig it.

usually with whole strings you just send it the whole rect size-fit to the window, and set the last parameter to 1, where it's 0 by default (left-aligned, 2 for right)
Ruby:
class Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_text(0, 0, Graphics.width - 24, fitting_height(1), @text, 1)
  end
end
forcing the text in the middle.
does it work for you
Ruby:
class Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_text(0, 0, Graphics.width - 24, fitting_height(1), @text, 1)
  end
end
forcing the text in the middle.
does it work for you

Definitely on the right track, very cool. However, when the description has a second line the text keeps going and squishes rather than continuing onto the next line as normal.

Original thread: https://forums.rpgmakerweb.com/threads/vx-ace-centering-the-text-displayed-by-window_help.173313/