Project1
标题:
字体阴影的脚本的问题
[打印本页]
作者:
然然
时间:
2008-8-30 06:37
提示:
作者被禁止或删除 内容自动屏蔽
作者:
精灵使者
时间:
2008-8-31 22:51
我记得有说明的……另外阴影可以自定义颜色的,你可以好好使用。
作者:
玄月
时间:
2008-8-31 22:53
因为没这类经验……所以飘过
作者:
dbshy
时间:
2008-9-1 00:01
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
class Bitmap
alias sailcat_draw_text draw_text unless method_defined? :sailcat_draw_text
def draw_text(p1,p2,p3=0,p4=3,p5=nil,p6=0,p7=3,p8=nil)
case p1
when Numeric
x = p1
y = p2
width = p3
height = p4
text = p5
align = p6
shadow_direction = p7
shadow_color = p8
if shadow_color.nil?
shadow_color = Color.new(0,0,0,self.font.color.alpha * 0.67)
end
when Rect
x = p1.x
y = p1.y
width = p1.width
height = p1.height
text = p2
align = p3
shadow_direction = p4
shadow_color = p5
if shadow_color.nil?
shadow_color = Color.new(0,0,0,self.font.color.alpha * 0.67)
end
end
color_temp = self.font.color.clone
c = Color.new(0,0,0)
if self.font.color != c then
if shadow_direction != 0
self.font.color = shadow_color
case shadow_direction
when 1
sailcat_draw_text(x-1,y+1,width,height,text,align)
when 3
sailcat_draw_text(x+1,y+1,width,height,text,align)
when 7
sailcat_draw_text(x-1,y-1,width,height,text,align)
when 9
sailcat_draw_text(x+1,y-1,width,height,text,align)
end
self.font.color=color_temp
end
end
sailcat_draw_text(x,y,width,height,text,align)
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
插入到MAIN前
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1