描边字效果(对话框兼容中)
http://web1.kuutuu.com/albums/userpics/10162/%E6%87%92%E6%95%A3%E4%BC%AA%E5%A8%98.jpg效果如图。暂时不是很好用,例如还不兼容一些对话框脚本……如果有点脚本基础的人可以直接搜索:
draw_text
然后在后面加个"Color.new(255,255,255,255)"。
【兼容更新】:
8月24日——fuki式对话加强
module RPG#——如果不需要描边,可以把Color.new(X,X,X,X)改为nil。四个数值分别是:红色、绿色、蓝色、透明度。#——帮助窗口WindowHelp_Color = Color.new(255,0,0,255)#——计时器SpriteTime_Color = Color.new(255,0,0,255)#——对话原颜色Message_Color = Color.new(0,0,255,255)#——对话附加颜色Others_Color = #——对话框名字颜色Name_Color = Color.new(255,0,0,255)endclass Bitmapalias lv_draw_text draw_text#——(附加)字体颜色、描边颜色、描边大小。def draw_text(p1, p2, p3 = 0, p4 = nil, p5 = 1, p6 = 0, p7 = nil, p8 = 1) case $lv_09 when 1 color = RPG::Message_Color when 2 color = RPG::WindowHelp_Color when 3 color = RPG::SpriteTime_Color when 4..11 color = RPG::Others_Color[$lv_09-4] when 12 color = RPG::Name_Color end if p1.is_a?(Rect) x = p1.x y = p1.y width = p1.width height = p1.height text = p2 align = p3 color = p4 unless p4 == nil size = p5 else x = p1 y = p2 width = p3 height = p4 text = p5 align = p6 color = p7 unless p7 == nil size = p8 end unless color.is_a?(Color) lv_draw_text(x,y,width,height,text,align) return end old_color = self.font.color.clone self.font.color = color x += size lv_draw_text(x,y,width,height,text,align) x -= size*2 lv_draw_text(x,y,width,height,text,align) x += size y += size lv_draw_text(x,y,width,height,text,align) y -= size*2 lv_draw_text(x,y,width,height,text,align) y += size self.font.color = old_color lv_draw_text(x,y,width,height,text,align)endendclass Window_Messagealias lv_update updatedef update $lv_09 = 1 lv_update $lv_09 = falseendendclass Window_Helpalias lv_set_text set_textdef set_text(text,align = 0) $lv_09 = 2 lv_set_text(text,align) $lv_09 = falseendendclass Sprite_Timeralias lv_update updatedef update $lv_09 = 3 lv_update $lv_09 = falseendendclass Window_Basealias lv_text_color text_colordef text_color(n) $lv_09 = 4+n return lv_text_color(n)endendclass Air_Textalias old_initialize initializedef initialize(x, y, designate_text) a = $lv_09 $lv_09 = 12 old_initialize(x, y, designate_text) $lv_09 = aendend复制代码
本帖来自P1论坛作者「旅」,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=132379若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
页:
[1]