class << DataManager
alias mf_240331msc make_save_contents
def make_save_contents
contents = mf_240331msc
contents[:maphelp] = $map_help
contents
end
alias mf_240331esc extract_save_contents
def extract_save_contents(contents)
mf_240331esc(contents)
$map_help = contents[:maphelp]
end
end
class Game_Interpreter
def set_maphelp(text)
$window_mh.set_text(text)
end
end
class Window_MapHelp < Window_Base
def initialize(x,y)
super(x, y, Graphics.width/2, fitting_height(2))
self.opacity = 0
$map_help ||= ""
contents.font.size = 12
refresh
end
def update
super
@back_sprite.x = self.x
@back_sprite.y = self.y
end
def set_text(text)
if text != $map_help
$map_help = text
refresh
end
end
def clear
set_text("")
end
def refresh
contents.clear
contents.font.size = 16
draw_text(60, 7, width, line_height, $map_help)
end
def draw_back_sprite
@back_sprite = Sprite.new
@back_sprite.bitmap = Cache.system("Map_Help")
@back_sprite.x = self.x
@back_sprite.y = self.y
end
def dispose_backsprite
@back_sprite.dispose
end
end
class Scene_Map
alias mf230530_start start
def start
mf230530_start
c_mh_window
end
def c_mh_window
$window_mh ||= Window_MapHelp.new(Graphics.width/2,0)
$window_mh.show
$window_mh.draw_back_sprite
end
end
class << DataManager
alias mf_240331msc make_save_contents
def make_save_contents
contents = mf_240331msc
contents[:maphelp] = $map_help
contents
end
alias mf_240331esc extract_save_contents
def extract_save_contents(contents)
mf_240331esc(contents)
$map_help = contents[:maphelp]
end
end
class Game_Interpreter
def set_maphelp(text)
$window_mh.set_text(text)
end
end
class Window_MapHelp < Window_Base
def initialize(x,y)
super(x, y, Graphics.width/2, fitting_height(2))
self.opacity = 0
$map_help ||= ""
contents.font.size = 12
refresh
end
def update
super
@back_sprite.x = self.x
@back_sprite.y = self.y
end
def set_text(text)
if text != $map_help
$map_help = text
refresh
end
end
def clear
set_text("")
end
def refresh
contents.clear
contents.font.size = 16
draw_text(60, 7, width, line_height, $map_help)
end
def draw_back_sprite
@back_sprite = Sprite.new
@back_sprite.bitmap = Cache.system("Map_Help")
@back_sprite.x = self.x
@back_sprite.y = self.y
end
def dispose_backsprite
@back_sprite.dispose
end
end
class Scene_Map
alias mf230530_start start
def start
mf230530_start
c_mh_window
end
def c_mh_window
$window_mh ||= Window_MapHelp.new(Graphics.width/2,0)
$window_mh.show
$window_mh.draw_back_sprite
end
end