khanhdu

Simple Additional Menu Info

Apr 24th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.50 KB | None | 0 0
  1. # =============================================================================
  2. # [RPGVXACE] Hiện Thanh Thông Tin Map
  3. # Phiên Bản : 1.0
  4. # Trang Chủ : https://rpgmakervn.blogspot.com/
  5. # (Ngôn Ngữ Tiếng Việt)
  6. # =============================================================================
  7. ($imported ||= {})[:Theo_SimpleMenuInfo] = true
  8. # =============================================================================
  9. # Trạng Thái:
  10. # -----------------------------------------------------------------------------
  11. # 2013.07.20 - Hoàn Thành
  12. # =============================================================================
  13. =begin
  14.  
  15.   Công Dụng :
  16.   Hiện Thông tin map và số tiền vs thời gian
  17.  
  18.   Cách sử dụng:
  19.   gắn vào xài thôi
  20.  
  21.   Điều khoản sử dụng :
  22.   Tác giả đã viết scirpt này phục vụ ae làm game nên ae khi làm nhớ tên tác giả nhé
  23.   Tên tác giả là Theolized
  24.  
  25. =end
  26. # =============================================================================
  27. # Konfigurasi ada di script
  28. # =============================================================================
  29. class Window_MenuInfo < Window_Base
  30.   TimeVocab = "Thời Gian :" # Vocab untuk time
  31.  
  32.   # -----------------------------------------------------------------------
  33.   # Do not touch pass this line
  34.   # -----------------------------------------------------------------------
  35.   def initialize(width)
  36.     super(0,0,width,fitting_height(3))
  37.     update_placement
  38.     refresh
  39.   end
  40.  
  41.   def update_placement
  42.     self.y = Graphics.height - self.height
  43.   end
  44.  
  45.   def refresh
  46.     contents.clear
  47.     change_color(normal_color)
  48.     draw_location(0,0)
  49.     draw_playtime(0,line_height)
  50.     draw_currency_value(value,currency_unit,0,line_height*2,contents.width)
  51.   end
  52.  
  53.   def draw_location(x,y)
  54.     rect = Rect.new(x,y,contents.width,line_height)
  55.     draw_text(rect,$game_map.display_name,2)
  56.   end
  57.  
  58.   def draw_playtime(x,y)
  59.     rect = Rect.new(x,y,contents.width,line_height)
  60.     change_color(system_color)
  61.     draw_text(rect,TimeVocab)
  62.     change_color(normal_color)
  63.     draw_text(rect,$game_system.playtime_s,2)
  64.   end
  65.  
  66.   def value
  67.     $game_party.gold
  68.   end
  69.  
  70.   def currency_unit
  71.     Vocab::currency_unit
  72.   end
  73.  
  74.   def update
  75.     super
  76.     refresh if Graphics.frame_count % 60 == 0
  77.   end
  78.  
  79. end
  80.  
  81. class Scene_Menu < Scene_MenuBase
  82.  
  83.   def create_gold_window
  84.     width = @command_window.width
  85.     @gold_window = Window_MenuInfo.new(width)
  86.   end
  87.  
  88. end
Add Comment
Please, Sign In to add comment