Hmm, I guess I tried to get too fancy. The following should work :
EDIT: Code updated to include an option for a help window dimmed background.
#==============================================================================
# ** Game_ATS
#==============================================================================
class Game_ATS
CONFIG[:ats_choice_options].merge!( {
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# EDITABLE REGION
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# :choice_help_align_text
# ├ (value) 0 - Left Align
# ├ (value) 1 - Center Align
# └ (value) 2 - Right Align
choice_help_align_text: 0,
# :choice_help_dim_bg
# ├ (value) true - Display Dim Background
# └ (value) false - Display Windowskin
choice_help_dim_bg: false,
# :choice_help_dim_bg_color1
# └ (value) Color Object - Color used in background gradient
choice_help_dim_bg_color1: Color.new(0, 0, 0, 160),
# :choice_help_dim_bg_color2
# └ (value) Color Object - Color used in background gradient
choice_help_dim_bg_color2: Color.new(0, 0, 0, 0),
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# END EDITABLE REGION
#////////////////////////////////////////////////////////////////////////
} )
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
CONFIG[:ats_choice_options].keys.each { |key| attr_accessor key }
end # Game_ATS
#==============================================================================
# ** Game_Message
#==============================================================================
class Game_Message
Game_ATS::CONFIG[:ats_choice_options].keys.each { |key| attr_accessor key }
end # Game_Message
#==============================================================================
# ** Window_ChoiceHelp
#==============================================================================
class Window_ChoiceHelp < Window_Base
#--------------------------------------------------------------------------
# * NEW - Object Initialization
#--------------------------------------------------------------------------
def initialize(line_number = 2)
super(0, 0, Graphics.width, fitting_height(line_number))
create_back_bitmap
create_back_sprite
end
#--------------------------------------------------------------------------
# * SUPER - Free
#--------------------------------------------------------------------------
def dispose
dispose_back_bitmap
dispose_back_sprite
super
end
#--------------------------------------------------------------------------
# * NEW - Set Text
#--------------------------------------------------------------------------
def set_text(text)
update_back_sprite
update_text_alignment
if text != @text
@text = text
refresh
end
end
#--------------------------------------------------------------------------
# * NEW - Clear
#--------------------------------------------------------------------------
def clear
set_text("")
end
#--------------------------------------------------------------------------
# * NEW - Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_text_ex(4, 0, @text)
end
#--------------------------------------------------------------------------
# * SUPER - Hide Window
#--------------------------------------------------------------------------
def hide
@back_sprite.visible = false
super
end
#--------------------------------------------------------------------------
# * NEW - Create Background Bitmap
#--------------------------------------------------------------------------
def create_back_bitmap
@back_bitmap = Bitmap.new(width, height)
rect1 = Rect.new(0, 0, width, 12)
rect2 = Rect.new(0, 12, width, height - 24)
rect3 = Rect.new(0, height - 12, width, 12)
@back_bitmap.gradient_fill_rect(rect1, back_color2, back_color1, true)
@back_bitmap.fill_rect(rect2, back_color1)
@back_bitmap.gradient_fill_rect(rect3, back_color1, back_color2, true)
end
#--------------------------------------------------------------------------
# * NEW - Get Background Color 1
#--------------------------------------------------------------------------
def back_color1
$game_message.choice_help_dim_bg_color1
end
#--------------------------------------------------------------------------
# * NEW - Get Background Color 2
#--------------------------------------------------------------------------
def back_color2
$game_message.choice_help_dim_bg_color2
end
#--------------------------------------------------------------------------
# * NEW - Create Background Sprite
#--------------------------------------------------------------------------
def create_back_sprite
@back_sprite = Sprite.new
@back_sprite.bitmap = @back_bitmap
@back_sprite.visible = false
@back_sprite.z = z - 1
end
#--------------------------------------------------------------------------
# * NEW - Update Background Sprite
#--------------------------------------------------------------------------
def update_back_sprite
@back_sprite.visible = $game_message.choice_help_dim_bg
@back_sprite.x = x
@back_sprite.y = y
@back_sprite.opacity = openness
@back_sprite.update
end
#--------------------------------------------------------------------------
# * NEW - Update Text Alignment
#--------------------------------------------------------------------------
def update_text_alignment
@align = $game_message.choice_help_align_text
end
#--------------------------------------------------------------------------
# * NEW - Free Background Bitmap
#--------------------------------------------------------------------------
def dispose_back_bitmap
@back_bitmap.dispose
end
#--------------------------------------------------------------------------
# * NEW - Free Background Sprite
#--------------------------------------------------------------------------
def dispose_back_sprite
@back_sprite.dispose
end
#--------------------------------------------------------------------------
# * SUPER - Draw Text with Control Characters
#--------------------------------------------------------------------------
def draw_text_ex(x, y, text, *args, &block)
if @align != 0
text = convert_escape_characters(text)
@max_text_width = text_size(text).width
end
super(x, y, text, *args, &block)
end
#--------------------------------------------------------------------------
# * SUPER - Normal Character Processing
#--------------------------------------------------------------------------
def process_normal_character(c, pos, *args, &block)
if @align != 0
text_width = text_size(c).width
case @align
when 1
draw_text(((width / 2) - (@max_text_width / 2)) - pos[:x], pos[:y], text_width * 2, pos[:height], c)
when 2
draw_text((contents.width - @max_text_width) - pos[:x], pos[:y], text_width * 2, pos[:height], c)
end
pos[:x] -= text_width
else
super(c, pos, *args, &block)
end
end
end # Window_ChoiceHelp
#==============================================================================
# ** Window_ChoiceList
#==============================================================================
class Window_ChoiceList
#--------------------------------------------------------------------------
# * ALIAS - Object Initialization
#--------------------------------------------------------------------------
unless method_defined?(:choice_XYJpWTIZ_wcl_initialize)
alias_method(:choice_XYJpWTIZ_wcl_initialize, :initialize)
end
def initialize(*args, &block)
choice_XYJpWTIZ_wcl_initialize(*args, &block)
create_help_window
end
#--------------------------------------------------------------------------
# * ALIAS - Start
#--------------------------------------------------------------------------
unless method_defined?(:choice_s23eH7xd_wcl_start)
alias_method(:choice_s23eH7xd_wcl_start, :start)
end
def start(*args, &block)
update_background
choice_s23eH7xd_wcl_start(*args, &block)
end
#--------------------------------------------------------------------------
# * SUPER - Free
#--------------------------------------------------------------------------
def dispose
super
dispose_all_windows
end
#--------------------------------------------------------------------------
# * NEW - Free All Windows
#--------------------------------------------------------------------------
def dispose_all_windows
self.help_window.dispose
end
#--------------------------------------------------------------------------
# * NEW - Update Window Background
#--------------------------------------------------------------------------
def update_background
@background = $game_message.choice_help_dim_bg
self.help_window.opacity = @background ? 0 : 255
end
#--------------------------------------------------------------------------
# * NEW - Create Help Window
#--------------------------------------------------------------------------
def create_help_window
lines = $game_message.choice_help_win_lines
self.help_window = Window_ChoiceHelp.new(lines > 0 ? lines : 1)
help_window.z = self.z
help_window.hide
end
#--------------------------------------------------------------------------
# * OVERWRITE - Update Help Window
#--------------------------------------------------------------------------
def update_help
if index >= 0 && $game_message.choice_help_texts[index].is_a?(String)
@help_window.set_text($game_message.choice_help_texts[index])
else
help_window.clear
end
end
end # Window_ChoiceList