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
|