Help - Search - Members - Calendar
Full Version: Title Menu Help (VX)
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS2
Quackadoos
Hi guys

I was just wondering how you change the alignment of the title menu commands (the text itself, not the window) so that they are centered rather than to the left.

Thanks in advance.

Quackers
Kread-EX
CODE
class Window_Command < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index   : item number
  #     enabled : enabled flag. When false, draw semi-transparently.
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    align = $scene.is_a?(Scene_Title) ? 1 : 0
    self.contents.draw_text(rect, @commands[index], align)
  end

Put that somewhere in Materials. Depending of the scripts you are using, you might run into compatibility problems though.
Quackadoos
Thanks Kread, you're a star. happy.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.