赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 1689 |
最后登录 | 2019-11-8 |
在线时间 | 231 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 75
- 在线时间
- 231 小时
- 注册时间
- 2014-10-5
- 帖子
- 296
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
就是我在战斗状态栏自己加入了连图,可是怎么回事半透明的?请问怎么修改?
#encoding:utf-8 #============================================================================== # ■ Window_BattleStatus #------------------------------------------------------------------------------ # 战斗画面中,显示“队伍成员状态”的窗口。 #============================================================================== class Window_BattleStatus < Window_Selectable #-------------------------------------------------------------------------- # ● 初始化对象 #-------------------------------------------------------------------------- def initialize super(0, 0, window_width, window_height) refresh self.openness = 0 end #-------------------------------------------------------------------------- # ● 获取窗口的宽度 #-------------------------------------------------------------------------- def window_width Graphics.width - 128 end #-------------------------------------------------------------------------- # ● 获取窗口的高度 #-------------------------------------------------------------------------- def window_height fitting_height(4) end #-------------------------------------------------------------------------- # ● 获取项目数 #-------------------------------------------------------------------------- def item_max $game_party.battle_members.size end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh contents.clear draw_all_items end #-------------------------------------------------------------------------- # ● 描绘项目 #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color actor = $game_party.members[index] draw_actor_face(actor, rect.x , rect.y-20 ) draw_actor_name(actor, index * 100, rect.y + 2) #draw_actor_icons(actor, rect.x + 104, rect.y, rect.width - 104) draw_actor_icons(actor, index * 100 + 8, 36, 24) draw_crhp(rect.x-4,rect.y+64,actor.hp,actor.mhp,"") draw_crmp(rect.x-4,rect.y+76,actor.mp,actor.mmp,"") draw_actor_tp(actor, index * 100, 60, 72) end #---------------------------------------------------------------------- # ● 设置光标的位置 # index : 新的光标位置 #-------------------------------------------------------------------------- def index=(index) @index = index update_cursor refresh end #-------------------------------------------------------------------------- # ● 获取项目描画矩形 # index : 项目编号 #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.width = contents.width - 113 rect.height = 24 rect.x = index * 100 rect.y = 0 return rect end #-------------------------------------------------------------------------- # ● 更新光标矩形 #-------------------------------------------------------------------------- def update_cursor case @index when 0...4 self.cursor_rect.set(@index * 100, 0, 100, 96) else self.cursor_rect.empty # 光标无效 end end end
#encoding:utf-8
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 战斗画面中,显示“队伍成员状态”的窗口。
#==============================================================================
class Window_BattleStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, window_height)
refresh
self.openness = 0
end
#--------------------------------------------------------------------------
# ● 获取窗口的宽度
#--------------------------------------------------------------------------
def window_width
Graphics.width - 128
end
#--------------------------------------------------------------------------
# ● 获取窗口的高度
#--------------------------------------------------------------------------
def window_height
fitting_height(4)
end
#--------------------------------------------------------------------------
# ● 获取项目数
#--------------------------------------------------------------------------
def item_max
$game_party.battle_members.size
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_all_items
end
#--------------------------------------------------------------------------
# ● 描绘项目
#--------------------------------------------------------------------------
def draw_item(index)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = $game_party.members[index]
draw_actor_face(actor, rect.x , rect.y-20 )
draw_actor_name(actor, index * 100, rect.y + 2)
#draw_actor_icons(actor, rect.x + 104, rect.y, rect.width - 104)
draw_actor_icons(actor, index * 100 + 8, 36, 24)
draw_crhp(rect.x-4,rect.y+64,actor.hp,actor.mhp,"")
draw_crmp(rect.x-4,rect.y+76,actor.mp,actor.mmp,"")
draw_actor_tp(actor, index * 100, 60, 72)
end
#----------------------------------------------------------------------
# ● 设置光标的位置
# index : 新的光标位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
update_cursor
refresh
end
#--------------------------------------------------------------------------
# ● 获取项目描画矩形
# index : 项目编号
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.width = contents.width - 113
rect.height = 24
rect.x = index * 100
rect.y = 0
return rect
end
#--------------------------------------------------------------------------
# ● 更新光标矩形
#--------------------------------------------------------------------------
def update_cursor
case @index
when 0...4
self.cursor_rect.set(@index * 100, 0, 100, 96)
else
self.cursor_rect.empty # 光标无效
end
end
end
|
|