Project1
标题:
描边字体脚本修改颜色
[打印本页]
作者:
huangaidehua
时间:
2009-12-12 07:50
标题:
描边字体脚本修改颜色
本帖最后由 huangaidehua 于 2009-12-12 07:53 编辑
http://rpg.blue/web/index.php?doc-view-4161
帮我看看怎么改描边颜色
我想修改成蓝色 谢谢
以下是脚本
#======================================================================
# 脚本来自
www.66rpg.com
,使用请保留此信息
# 作者:暴动冲锋NANKONGX;最后升级日期:2007年7月14日
#======================================================================
class Bitmap
unless $OK
alias NKX_draw_text draw_text unless method_defined? :NKX_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
self.font.color = Color.new(0, 0, 0, 255)
NKX_draw_text(x + 1,y + 1,width, height, text, align)
NKX_draw_text(x + 1,y - 1,width, height, text, align)
NKX_draw_text(x - 1,y - 1,width, height, text, align)
NKX_draw_text(x - 1,y + 1,width, height, text, align)
self.font.color = color_temp
$OK = true
NKX_draw_text(x, y, width, height, text, align)
end
end
end
作者:
奶油Da蛋糕
时间:
2009-12-12 08:28
#======================================================================
# 脚本来自www.66rpg.com,使用请保留此信息
# 作者:暴动冲锋NANKONGX;最后升级日期:2007年7月14日
#======================================================================
class Bitmap
unless $OK
alias NKX_draw_text draw_text unless method_defined? :NKX_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
self.font.color = Color.new(0, 0, 255, 255)
NKX_draw_text(x + 1,y + 1,width, height, text, align)
NKX_draw_text(x + 1,y - 1,width, height, text, align)
NKX_draw_text(x - 1,y - 1,width, height, text, align)
NKX_draw_text(x - 1,y + 1,width, height, text, align)
self.font.color = color_temp
$OK = true
NKX_draw_text(x, y, width, height, text, align)
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1