赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 4 |
经验 | 0 |
最后登录 | 2019-6-14 |
在线时间 | 15 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 353
- 在线时间
- 15 小时
- 注册时间
- 2019-4-14
- 帖子
- 31
|
重新添加一个描绘图标的脚本就行了,很简单
#==============================================================================
# ** Window_ActorCommand
#------------------------------------------------------------------------------
# 本視窗顯示於作戰畫面中,用來選擇主角的行動指令。
#==============================================================================
class Window_ActorCommand < Window_Command
#--------------------------------------------------------------------------
# * 宣告執行個體變數
#--------------------------------------------------------------------------
attr_reader :commands # 命令
Command_Icon = {0 => 1, 1 => 2, 2 => 3, 3 =>4}
#--------------------------------------------------------------------------
# * 物件初始化
#--------------------------------------------------------------------------
def initialize
super(128, [], 1, 4)
self.active = false
end
#--------------------------------------------------------------------------
# * 設置參數
# actor : 主角
#--------------------------------------------------------------------------
def setup(actor)
s1 = Vocab::attack
s2 = Vocab::skill
s3 = Vocab::guard
s4 = Vocab::item
if actor.class.skill_name_valid # 自訂技能指令項顯示名合法?
s2 = actor.class.skill_name # 替換技能指令項顯示名
end
@commands = [s1, s2, s3, s4]
@item_max = 4
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * 繪製條目
# index : 條目編號
# enabled : 可用性標幟,如果為false則半透明化條目繪製。
#--------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.draw_icon(Command_Icon[index], rect.x, rect.y, enabled)
rect.x += 24
self.contents.draw_text(rect, @commands[index])
end
end
|
|