Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved]Center Text In Title Screen

Status
Not open for further replies.

Sles

Member

Hello, I'm having a bit of a problem centering the text of the the options in the title screen. I was wondering if anyone could help me out.

Thanks In Advance,

Frodo
 
Here you go!
Code:
class Window_Command < Window_Selectable
  alias :freakboy_draw_item :draw_item
  def draw_item(index, color)
    if $scene.kind_of?(Scene_Title)
      self.contents.font.color = color
      rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      self.contents.draw_text(rect, @commands[index], 1)
    else
      freakboy_draw_item(index, color)
    end
  end
end
 
This topic has been resolved. If Frodo or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top