Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ■ Ao no Kiseki Custom Battle System 13_2 Window Size Adjustment
- # @version 1 12/01/27
- # @author Saba Kan
- # @translator kirinelf
- #------------------------------------------------------------------------------
- # No configuration needed.
- #=========================================================================
- # Do not edit anything under this line unless you know what you're doing!
- #=========================================================================
- class Window_BattleLog < Window_Selectable
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(80, 0, window_width - 80, window_height)
- self.z = 200
- self.opacity = 0
- @lines = []
- @num_wait = 0
- create_back_bitmap
- create_back_sprite
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 背景の矩形を取得
- #--------------------------------------------------------------------------
- def back_rect
- Rect.new(80, padding, width, line_number * line_height)
- end
- end
- class Scene_Battle
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの作成
- #--------------------------------------------------------------------------
- def create_help_window
- @help_window = Window_BattleHelp.new
- @help_window.visible = false
- end
- end
- class Window_BattleHelp < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(line_number = 2)
- super(160, 0, Graphics.width - 160, fitting_height(line_number))
- end
- #--------------------------------------------------------------------------
- # ● テキスト設定
- #--------------------------------------------------------------------------
- def set_text(text)
- if text != @text
- @text = text
- refresh
- end
- end
- #--------------------------------------------------------------------------
- # ● クリア
- #--------------------------------------------------------------------------
- def clear
- set_text("")
- end
- #--------------------------------------------------------------------------
- # ● アイテム設定
- # item : スキル、アイテム等
- #--------------------------------------------------------------------------
- def set_item(item)
- set_text(item ? item.description : "")
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- draw_text_ex(4, 0, @text)
- end
- end
- class Window_BattleSkill
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # info_viewport : 情報表示用ビューポート
- #--------------------------------------------------------------------------
- def initialize(help_window, info_viewport)
- y = help_window.height + 4
- super(160, y, Graphics.width - 160, info_viewport.rect.y - y - 4)
- self.visible = false
- @help_window = help_window
- @info_viewport = info_viewport
- end
- end
- class Window_BattleItem
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # info_viewport : 情報表示用ビューポート
- #--------------------------------------------------------------------------
- def initialize(help_window, info_viewport)
- y = help_window.height + 4
- super(160, y, Graphics.width - 160, info_viewport.rect.y - y - 4)
- self.visible = false
- @help_window = help_window
- @info_viewport = info_viewport
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement