Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- #
- # Pacman Advanced Creative (PAC) Engine - Centered Window
- # 25/4/2011
- # Type: Main
- # Installation: Plug-and-play.
- # Level: Super-Simple
- # Paste above main, save the editor.
- #
- #===============================================================================
- #
- # WHAT THE HELL IS THIS???
- # This is a tool for scripters. It is a centered window that I have graciously
- # made for you to use. To use this properly, instead of calling a Window_Command
- # or have a class inherit from Window_Command, call Window_Command_Centered.
- # It is a very simple edit, just something that bugged me a little. Use it.
- # It's good for you.
- #
- #===============================================================================
- $imported = {} if $imported == nil
- $imported["PAC_CenteredWindow"] = true
- #==============================================================================
- # ** Window_Command_Centered
- #------------------------------------------------------------------------------
- # This window displays the command window, but better.
- #==============================================================================
- class Window_Command_Centered < Window_Command
- #--------------------------------------------------------------------------
- # * Draw Item
- #--------------------------------------------------------------------------
- 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
- self.contents.draw_text(rect, @commands[index],1) # Draw the text aligned.
- end
- end
- #===============================================================================
- #
- # END OF SCRIPT
- #
- #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement