#===============================================================================
# ** Class Game_Tip
#-------------------------------------------------------------------------------
# * Runs processing on all tips for the player to read
#===============================================================================
class Game_Tip
attr_accessor :text
attr_accessor :variablenumber
def initialize
@text = Hash.new(0) #set text as Hash. Change Zero to Default Tip
@text[0] = "Text" #Text of Tip given when Variable is set to 2
@text[1] = "Text2" #Text of Tip given when Variable is set to 1
@variablenumber = 0 #number of variable text is based after
end
end
#===============================================================================
# ** Class Window_Tip
#-------------------------------------------------------------------------------
# * Runs processing on Scene Map's Window_Tip
#===============================================================================
class Window_Tip < Window_Base
def initialize
super(0,0,320,64)
$game_tip = Game_Tip.new
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.draw_text(0, 0, 320, 32, $game_tip.text[$game_variables[$game_tip.variablenumber]].to_s)
end
end
#===============================================================================
# ** Class Scene_Map
#-------------------------------------------------------------------------------
# * Edits processing on the Scene Map Class
#===============================================================================
class Scene_Map
attr_accessor :tipwindow
alias maindraws89 main
alias mainupdates89 update
def main
@tipwindow = Window_Tip.new
maindraws89
@tipwindow.dispose
end
def update
@tipwindow.update
mainupdates89
end
end