本帖最后由 alexncf125 于 2020-10-15 21:36 编辑
把相关代码抠出来很难么??
这十多行就是了
class Window_Base < Window alias window_base_process_escape_character_sam process_escape_character def process_escape_character(code, text, pos) case code.upcase when 'FN' text.sub!(/\[(.*?)\]/, "") font_name = $1.to_s font_name = Font.default_name if font_name.nil? contents.font.name = font_name.to_s else window_base_process_escape_character_sam(code, text, pos) end end end
class Window_Base < Window
alias window_base_process_escape_character_sam process_escape_character
def process_escape_character(code, text, pos)
case code.upcase
when 'FN'
text.sub!(/\[(.*?)\]/, "")
font_name = $1.to_s
font_name = Font.default_name if font_name.nil?
contents.font.name = font_name.to_s
else
window_base_process_escape_character_sam(code, text, pos)
end
end
end
|