#--------------------------------------------------------------------------
# new method: adjust_pop_message
#--------------------------------------------------------------------------
def adjust_pop_message(text = " ")
return unless SceneManager.scene_is?(Scene_Map)
unless @event_pop_id
if $imported["YEA-MessageSystem"]
#adjust_message_window_size
end
return
end
text.gsub!(/\\\w*\[\w\]|\n/i,'') #<- 加这一行来解决控制符的问题
n_line = cal_number_line(text)
n_line = YSE::POP_MESSAGE::LIMIT[:limit_line] if YSE::POP_MESSAGE::LIMIT[:limit_line] > 0 && cal_number_line(text) > YSE::POP_MESSAGE::LIMIT[:limit_line]
@real_lines = n_line
self.height = fitting_height(n_line)
self.width = cal_width_line(text) + 24 #<- 增加这个数字来调整后面的距离(如果不顺眼)
self.width += new_line_x
if self.width > YSE::POP_MESSAGE::LIMIT[:limit_width] && YSE::POP_MESSAGE::LIMIT[:limit_width] > 0
self.width = YSE::POP_MESSAGE::LIMIT[:limit_width]
end
create_contents
update_placement
end