Advertisement
kirinelf

Ao no Kiseki CBS 5

Apr 2nd, 2012
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.92 KB | None | 0 0
  1. #==============================================================================
  2. # ■ Ao no Kiseki Custom Battle System 13_2 Window Size Adjustment
  3. #   @version 1 12/01/27
  4. #   @author Saba Kan
  5. #   @translator kirinelf
  6. #------------------------------------------------------------------------------
  7. #  No configuration needed.
  8. #=========================================================================
  9. # Do not edit anything under this line unless you know what you're doing!
  10. #=========================================================================
  11.  
  12. class Window_BattleLog < Window_Selectable
  13.   #--------------------------------------------------------------------------
  14.   # ● オブジェクト初期化
  15.   #--------------------------------------------------------------------------
  16.   def initialize
  17.     super(80, 0, window_width - 80, window_height)
  18.     self.z = 200
  19.     self.opacity = 0
  20.     @lines = []
  21.     @num_wait = 0
  22.     create_back_bitmap
  23.     create_back_sprite
  24.     refresh
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 背景の矩形を取得
  28.   #--------------------------------------------------------------------------
  29.   def back_rect
  30.     Rect.new(80, padding, width, line_number * line_height)
  31.   end
  32. end
  33.  
  34. class Scene_Battle
  35.   #--------------------------------------------------------------------------
  36.   # ● ヘルプウィンドウの作成
  37.   #--------------------------------------------------------------------------
  38.   def create_help_window
  39.     @help_window = Window_BattleHelp.new
  40.     @help_window.visible = false
  41.   end
  42. end
  43.  
  44. class Window_BattleHelp < Window_Base
  45.   #--------------------------------------------------------------------------
  46.   # ● オブジェクト初期化
  47.   #--------------------------------------------------------------------------
  48.   def initialize(line_number = 2)
  49.     super(160, 0, Graphics.width - 160, fitting_height(line_number))
  50.   end
  51.     #--------------------------------------------------------------------------
  52.   # ● テキスト設定
  53.   #--------------------------------------------------------------------------
  54.   def set_text(text)
  55.     if text != @text
  56.       @text = text
  57.       refresh
  58.     end
  59.   end
  60.   #--------------------------------------------------------------------------
  61.   # ● クリア
  62.   #--------------------------------------------------------------------------
  63.   def clear
  64.     set_text("")
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● アイテム設定
  68.   #     item : スキル、アイテム等
  69.   #--------------------------------------------------------------------------
  70.   def set_item(item)
  71.     set_text(item ? item.description : "")
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● リフレッシュ
  75.   #--------------------------------------------------------------------------
  76.   def refresh
  77.     contents.clear
  78.     draw_text_ex(4, 0, @text)
  79.   end
  80. end
  81.  
  82. class Window_BattleSkill
  83.   #--------------------------------------------------------------------------
  84.   # ● オブジェクト初期化
  85.   #     info_viewport : 情報表示用ビューポート
  86.   #--------------------------------------------------------------------------
  87.   def initialize(help_window, info_viewport)
  88.     y = help_window.height + 4
  89.     super(160, y, Graphics.width - 160, info_viewport.rect.y - y - 4)
  90.     self.visible = false
  91.     @help_window = help_window
  92.     @info_viewport = info_viewport
  93.   end
  94. end
  95.  
  96. class Window_BattleItem
  97.   #--------------------------------------------------------------------------
  98.   # ● オブジェクト初期化
  99.   #     info_viewport : 情報表示用ビューポート
  100.   #--------------------------------------------------------------------------
  101.   def initialize(help_window, info_viewport)
  102.     y = help_window.height + 4
  103.     super(160, y, Graphics.width - 160, info_viewport.rect.y - y - 4)
  104.     self.visible = false
  105.     @help_window = help_window
  106.     @info_viewport = info_viewport
  107.   end
  108. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement