Advertisement
Bigace360

Window_MapName Plus+ [RMVXA]

Apr 26th, 2012
1,008
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.14 KB | None | 0 0
  1. #+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  2. # ■ Window_MapName Plus+
  3. # ■ Author: Bigace360  
  4. # ■ Version: 1.0
  5. # ■ Date: April 26, 2012
  6. #+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  7. # v1.0 (4.26.2012) ● Original script completed
  8. #+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  9.  
  10. module ACE
  11.     module MAPNAME
  12.         NAME_ALIGN = 1
  13.         FONT_SIZE = 24
  14.         FONT_TYPE = 'Verdana'
  15.     end
  16. end
  17.  
  18. class Window_MapName < Window_Base
  19.     include ACE::MAPNAME
  20.     def initialize
  21.         super(0, 0, Graphics.width, fitting_height(1))
  22.         self.opacity, self.contents_opacity, @show_count = 0, 0, 0
  23.         self.contents.font.size, self.contents.font.name = FONT_SIZE, FONT_TYPE
  24.         refresh
  25.     end
  26.     def update_fadein
  27.         self.opacity += 32 unless $game_map.display_name.empty?
  28.         self.contents_opacity += 16
  29.     end
  30.     def update_fadeout
  31.         self.opacity -= 16 unless $game_map.display_name.empty?
  32.         self.contents_opacity -= 16
  33.     end
  34.     def refresh
  35.         contents.clear
  36.         return if $game_map.display_name.empty?
  37.         draw_text(contents.rect, $game_map.display_name, NAME_ALIGN)
  38.     end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement