TheoAllen

Theo - Simple Menu Info

Jul 20th, 2013
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.63 KB | None | 0 0
  1. # =============================================================================
  2. # TheoAllen - Simple Additional Menu Info
  3. # Version : 1.0
  4. # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
  5. # (This script documentation is written in informal indonesian language)
  6. # =============================================================================
  7. ($imported ||= {})[:Theo_SimpleMenuInfo] = true
  8. # =============================================================================
  9. # CHANGE LOGS:
  10. # -----------------------------------------------------------------------------
  11. # 2013.07.20 - Finished script
  12. # =============================================================================
  13. =begin
  14.  
  15.   Perkenalan :
  16.   Script ini nambahin info Location ama Playtime di main menu RTP
  17.  
  18.   Cara penggunaan :
  19.   Pasang dibawah material namun diatas main
  20.  
  21.   Terms of Use :
  22.   Credit gw, TheoAllen. Kalo semisal u bisa ngedit2 script gw trus jadi lebih
  23.   keren, terserah. Ane bebasin. Asal ngga ngeklaim aja. Kalo semisal mau
  24.   dipake buat komersil, jangan lupa, gw dibagi gratisannya.
  25.  
  26. =end
  27. # =============================================================================
  28. # Konfigurasi ada di script
  29. # =============================================================================
  30. class Window_MenuInfo < Window_Base
  31.   TimeVocab = "Time :" # Vocab untuk time
  32.  
  33.   # -----------------------------------------------------------------------
  34.   # Do not touch pass this line
  35.   # -----------------------------------------------------------------------
  36.   def initialize(width)
  37.     super(0,0,width,fitting_height(3))
  38.     update_placement
  39.     refresh
  40.   end
  41.  
  42.   def update_placement
  43.     self.y = Graphics.height - self.height
  44.   end
  45.  
  46.   def refresh
  47.     contents.clear
  48.     change_color(normal_color)
  49.     draw_location(0,0)
  50.     draw_playtime(0,line_height)
  51.     draw_currency_value(value,currency_unit,0,line_height*2,contents.width)
  52.   end
  53.  
  54.   def draw_location(x,y)
  55.     rect = Rect.new(x,y,contents.width,line_height)
  56.     draw_text(rect,$game_map.display_name,2)
  57.   end
  58.  
  59.   def draw_playtime(x,y)
  60.     rect = Rect.new(x,y,contents.width,line_height)
  61.     change_color(system_color)
  62.     draw_text(rect,TimeVocab)
  63.     change_color(normal_color)
  64.     draw_text(rect,$game_system.playtime_s,2)
  65.   end
  66.  
  67.   def value
  68.     $game_party.gold
  69.   end
  70.  
  71.   def currency_unit
  72.     Vocab::currency_unit
  73.   end
  74.  
  75.   def update
  76.     super
  77.     refresh if Graphics.frame_count % 60 == 0
  78.   end
  79.  
  80. end
  81.  
  82. class Scene_Menu < Scene_MenuBase
  83.  
  84.   def create_gold_window
  85.     width = @command_window.width
  86.     @gold_window = Window_MenuInfo.new(width)
  87.   end
  88.  
  89. end
Advertisement
Add Comment
Please, Sign In to add comment