赞 | 0 |
VIP | 2 |
好人卡 | 0 |
积分 | 3 |
经验 | 5756 |
最后登录 | 2022-8-10 |
在线时间 | 271 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 284
- 在线时间
- 271 小时
- 注册时间
- 2013-4-23
- 帖子
- 143
|
這兒有自动换行腳本,
但你應養成手動換行的習慣
PS:這腳本會跟某文字語音腳本有沖突
- class Window_Base
-
- alias :iisnow_convert_escape_characters :convert_escape_characters
- def convert_escape_characters(text)
- result = iisnow_convert_escape_characters(text)
- result.gsub!(/\ek/) { "\k" }
- result
- end
- def process_character(c, text, pos)
- case c
- when "\r"
- return
- when "\n"
- process_new_line(text, pos) if !@auto_n
- when "\k"
- @auto_n = false
- when "\f"
- process_new_page(text, pos)
- when "\e"
- process_escape_character(obtain_escape_code(text), text, pos)
- else
- process_normal_character(c,text,pos)
- end
- end
-
- def process_normal_character(c,text,pos)
- @auto_n = true
- text_width = text_size(c).width
- if real_width - pos[:x] > text_width
- draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)
- pos[:x] += text_width
- else
- process_new_line(text,pos)
- process_normal_character(c,text,pos)
- end
- end
-
- def real_width
- return self.width - 2 * standard_padding
- end
-
- end
- class Window_Message
-
- def process_normal_character(c,text,pos)
- super
- wait_for_one_character
- end
- end
复制代码 |
评分
-
查看全部评分
|