class Window_MapName < Window_Base
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
return if $game_switches[1] # 1号开关打开时候不显示
self.opacity = 255
self.contents_opacity = 255
name = $data_mapinfos[@map_id].name
width = self.contents.text_size(name).width
height = self.contents.text_size(name).height
self.width = width + 32
self.height = height + 32
self.contents = Bitmap.new(width, height)
self.contents.font.size = 20
self.x = 0
self.y = 0
self.contents.font.color = system_color
self.contents.draw_text(0, 0, width, 20, name, 1)
end
class Window_MapName < Window_Base
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
return if $game_switches[1] # 1号开关打开时候不显示
self.opacity = 255
self.contents_opacity = 255
name = $data_mapinfos[@map_id].name
width = self.contents.text_size(name).width
height = self.contents.text_size(name).height
self.width = width + 32
self.height = height + 32
self.contents = Bitmap.new(width, height)
self.contents.font.size = 20
self.x = 0
self.y = 0
self.contents.font.color = system_color
self.contents.draw_text(0, 0, width, 20, name, 1)
end
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
def update
if $game_switches[1]
self.opacity = 0
return
end
if $game_map.map_id != @map_id
@map_id = $game_map.map_id
refresh
self.opacity -= 5
self.contents_opacity = 255
end
refresh if $game_map.map_id == 388
return if self.opacity == 0
self.opacity = 255 #原来是-=5
self.contents_opacity = 255 #原来是-=5
end
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
def update
if $game_switches[1]
self.opacity = 0
return
end
if $game_map.map_id != @map_id
@map_id = $game_map.map_id
refresh
self.opacity -= 5
self.contents_opacity = 255
end
refresh if $game_map.map_id == 388
return if self.opacity == 0
self.opacity = 255 #原来是-=5
self.contents_opacity = 255 #原来是-=5
end