| 赞 | 9 |
| VIP | |
| 好人卡 | |
| 积分 | 47 |
| 经验 | |
| 最后登录 | 2026-9-24 |
| 在线时间 | 1069 小时 |
- 梦石
- 0
- 星屑
- 4657
- 在线时间
- 1069 小时
- 注册时间
- 2013-3-28
- 回帖
- 309

|
发表于 2016-7-15 17:16:08
|
显示全部楼层
把*Plugin_BattleCommand改成
[pre lang="ruby"]#==============================================================================
class Window_BattleCommand < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 0, 180, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
@commands = ["攻","技","防","物","逃"]
@item_max = 5
@column_max = 5
refresh
self.active = false
self.visible = false
self.index = 0
end
#---------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
if i == 5#如果你把"逃"和"撤退"合并了就在后面添一个"-1"
unless $game_temp.battle_can_escape
disable_item(i)
end
else
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
def draw_item(index,color=normal_color)
x = index % 5 * 30
y = index / 5 * 30
self.contents.font.color = color#Color.new(255, 255, 255, 128)#normal_color
self.contents.draw_text(x, y, 30, 30, @commands[index], 1)
end
#--------------------------------------------------------------------------
def update_cursor_rect
x = index % 5 * 30
y = index / 5 * 30
self.cursor_rect.set(x, y, 30, 30)
end
#--------------------------------------------------------------------------
# 卐 项目无效化
# index : 项目编号
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index,disabled_color)
end
end
#===============================================================================[/pre] |
|