Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Title Menu Help (VX), Centering text in the command window.
Quackadoos
post Dec 15 2011, 07:31 AM
Post #1


Level 5
Group Icon

Group: Member
Posts: 63
Type: Writer
RM Skill: Intermediate
Rev Points: 10




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


__________________________
Current Projects:

Reapers
I support:










Go to the top of the page
 
+Quote Post
   
Kread-EX
post Dec 15 2011, 07:57 AM
Post #2


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




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.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Quackadoos
post Dec 15 2011, 08:00 AM
Post #3


Level 5
Group Icon

Group: Member
Posts: 63
Type: Writer
RM Skill: Intermediate
Rev Points: 10




Thanks Kread, you're a star. happy.gif


__________________________
Current Projects:

Reapers
I support:










Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 07:21 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker