| 赞 | 9 |
| VIP | |
| 好人卡 | |
| 积分 | 17 |
| 经验 | |
| 最后登录 | 2025-3-31 |
| 在线时间 | 485 小时 |
- 梦石
- 0
- 星屑
- 1748
- 在线时间
- 485 小时
- 注册时间
- 2006-1-7
- 回帖
- 996
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
想修改Window_Skill,在战斗的时候之显示一排。然后,就去不掉箭头了。。。。。怎么找也找不到地方。
求帮忙去掉,顺便告诉我是在哪里除了问题。。。。。
Window_Skill
Window_Skill 现在在战斗中呼出技能窗口的时候,右侧总有箭头。
但是如果根据数据重建一个Window_Skill2,在游戏中调用Window_Skill2,就不会有箭头。
求帮忙@RyanBern
[pre lang="ruby"]
#==============================================================================
# ■ Window_Skill
#------------------------------------------------------------------------------
# 特技画面、战斗画面、显示可以使用的特技浏览的窗口。
#==============================================================================
class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 128, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# 战斗中的情况下将窗口移至中央并将其半透明化
if $game_temp.in_battle
@column_max = 1
self.x = 64
self.y = 64
self.width = 320
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● 获取特技
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills]
if skill != nil
@data.push(skill)
end
end
# 如果项目数不是 0 就生成位图、重新描绘全部项目
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.clear #byakki#??
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 描绘项目
# index : 项目编号
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
if $game_temp.in_battle
x = 4
y = index * 32
else
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
end
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == disabled_color ? 128 : 255
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 156, 32, skill.name, 0)
self.contents.draw_text(x + 184, y, 48, 32, skill.sp_cost.to_s, 2)
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
[/pre]
|
评分
-
查看全部评分
|