This repository has been archived on 2026-05-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
rpgskeleton/Scripts/RPG/Window_Help.rb
2014-04-23 21:59:50 -07:00

45 lines
1.6 KiB
Ruby

# -*- coding: utf-8 -*-
#==============================================================================
# ** Window_Help
#------------------------------------------------------------------------------
# This window shows skill and item explanations along with actor status.
#==============================================================================
class Window_Help < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(line_number = 2)
super(0, 0, Graphics.width, fitting_height(line_number))
end
#--------------------------------------------------------------------------
# * Set Text
#--------------------------------------------------------------------------
def set_text(text)
if text != @text
@text = text
refresh
end
end
#--------------------------------------------------------------------------
# * Clear
#--------------------------------------------------------------------------
def clear
set_text("")
end
#--------------------------------------------------------------------------
# * Set Item
# item : Skills and items etc.
#--------------------------------------------------------------------------
def set_item(item)
set_text(item ? item.description : "")
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_text_ex(4, 0, @text)
end
end