设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2330|回复: 2
打印 上一主题 下一主题

[已经过期] 字体描边 脚本 怎么特定窗口显示有效果

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3134
在线时间
220 小时
注册时间
2020-5-21
帖子
49
跳转到指定楼层
1
发表于 2020-7-15 22:40:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 RyanBern 于 2020-7-16 17:10 编辑

菜单界面  开启 字体描边功能
战斗界面  关闭 字体描边功能


##########下面是脚本 #############

RUBY 代码复制
  1. #======================================================================
  2. # 脚本来自[url]www.66rpg.com[/url],使用请保留此信息
  3. # 作者:暴动冲锋NANKONGX;最后升级日期:2007年7月14日
  4. #======================================================================
  5. class Bitmap
  6. unless $OK
  7.   alias NKX_draw_text draw_text unless method_defined? :NKX_draw_text
  8. def draw_text(p1, p2, p3 = 0, p4 = 3, p5 = nil, p6 = 0, p7 = 3, p8 = nil)
  9.      case p1
  10.      when Numeric
  11.        x = p1
  12.        y = p2
  13.        width = p3
  14.        height = p4
  15.        text = p5
  16.        align = p6
  17.        shadow_direction = p7
  18.        shadow_color = p8
  19.        if shadow_color.nil?
  20.          shadow_color = Color.new(0, 0, 0, self.font.color.alpha * 0.67)
  21.        end
  22.      when Rect
  23.        x = p1.x
  24.        y = p1.y
  25.        width = p1.width
  26.        height = p1.height
  27.        text = p2
  28.        align = p3
  29.        shadow_direction = p4
  30.        shadow_color = p5
  31.        if shadow_color.nil?
  32.          shadow_color = Color.new(0, 0, 0, self.font.color.alpha * 0.67)
  33.        end
  34.      end
  35.      color_temp = self.font.color.clone
  36.   self.font.color = Color.new(0, 0, 0, 125)
  37.     NKX_draw_text(x + 1,y + 1,width, height, text, align)
  38.     NKX_draw_text(x + 1,y - 1,width, height, text, align)
  39.     NKX_draw_text(x - 1,y - 1,width, height, text, align)
  40.     NKX_draw_text(x - 1,y + 1,width, height, text, align)
  41.   self.font.color = color_temp
  42.      $OK = true
  43.      NKX_draw_text(x, y, width, height, text, align)
  44.    end
  45. end
  46. end

点评

这个需要一个个的在对应的窗口判断修改。  发表于 2020-7-17 09:54

Lv3.寻梦者

梦石
0
星屑
3134
在线时间
220 小时
注册时间
2020-5-21
帖子
49
2
 楼主| 发表于 2020-7-17 10:59:22 | 只看该作者
额。。求大神 举个例子啊
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-25 11:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表