| 赞 | 10 |
| VIP | |
| 好人卡 | |
| 积分 | 40 |
| 经验 | |
| 最后登录 | 2025-9-8 |
| 在线时间 | 604 小时 |
- 梦石
- 0
- 星屑
- 4017
- 在线时间
- 604 小时
- 注册时间
- 2017-4-21
- 回帖
- 177
|
楼主 |
发表于 2019-3-7 19:47:28
|
显示全部楼层
本帖最后由 阮声悠悠 于 2019-3-7 20:12 编辑
一个角色把所有角色名字都罗列出来的脚本
- #--------------------------------------------------------------------------
- # ● 描绘项目
- # index : 项目编号
- #--------------------------------------------------------------------------
- def draw_item(index)
- item = @data[index]
- @index=item.id
- #$game_self_switches[[1,a,"A"]] = true
- #如果队伍中含有该角色则名称绿色否则白色,如不需要该功能下面3句注释掉
- $game_party.actors.each{|i|i.id==@index ?
- (self.contents.font.color = Color.new(0, 255, 0, 255);break):
- (self.contents.font.color = Color.new(255, 255, 255, 255);next)}
- x = 4 + index % 2 * (288 + 32)
- y = index / 2 * 32
- rect = Rect.new(x, y, self.width / @column_max - 32, 32)
- self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
- self.contents.draw_text(x + 52, y, 212, 32, item.name, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 8, y, 24, 32, (index+1).to_s, 0)
- end
复制代码 |
|