| 赞 | 0 |
| VIP | 0 |
| 好人卡 | 0 |
| 积分 | 1 |
| 经验 | 83 |
| 最后登录 | 2012-4-21 |
| 在线时间 | 13 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 13 小时
- 注册时间
- 2007-6-13
- 帖子
- 458
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
我使用的是轩辕的美化菜单系统:以下发一段脚本(经过大量修改.)求各位高手们帮小弟再修改下,修改成当选择了某角色后才显示角色的头像和HP,SP,要没选择那就隐藏或透明掉.
脚本:- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 显示菜单画面和同伴状态的窗口。
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化目标
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 160, 352)#(0, 0, 160, 352)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- self.active = false
- self.index = -2
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- x = 30#64
- y = 0#i * 160#80
- actor = $game_party.actors[i]
- bitmap = Bitmap.new("Graphics/System/menu/headp/" + actor.name + ".png")
- #头像大小
- src_rect = Rect.new(0, 0, 500, 500)#(0, 0, 42, 66)
- self.contents.blt(x - 30, y + 10, bitmap, src_rect)#(x - 64, y + 10, bitmap, src_rect)
- self.draw_actor_state(actor, x - 60, y + 34 + 17)#(actor, x - 60, y + 34 + 17)
- # 我全写成散的! =。=
- self.contents.font.color = normal_color
- self.contents.font.size = 20#字体大小
- #角色名坐标
- self.contents.draw_text(x - 130, y, 120, 300, actor.name)#(x - 30, y, 120, 32, actor.name)
- self.contents.font.color = system_color
- self.contents.font.color = normal_color
- self.contents.font.size = 18#16字体大小
- self.contents.font.color = system_color
- #HP坐标
- self.contents.draw_text(x - 30, y + 535 + 17 , 32, 32, $data_system.words.hp)#(x - 30, y + 17 + 17, 32, 32, $data_system.words.hp)
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
- self.contents.draw_text(x + 6, y + 135 + 17 +13, 32, 32, actor.hp.to_s, 2)#(x - 6, y + 17 + 17, 32, 32, actor.hp.to_s, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x - 0 + 40, y + 135 + 17 +13, 12, 32, "/", 1)#(x - 26 + 48, y + 17 + 17, 12, 32, "/", 1)
-
- self.contents.draw_text(x + 0 + 56, y + 135 + 17 +13, 32, 32, actor.maxhp.to_s)
- self.contents.font.color = system_color
- #SP坐标
- self.contents.draw_text(x - 30, y + 550 +17, 32, 32, $data_system.words.sp)#(x - 30, y + 34 +17, 32, 32, $data_system.words.sp)
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
- self.contents.draw_text(x + 6, y + 150 + 17 +13, 32, 32, actor.sp.to_s, 2)#(x - 6, y + 34 + 17, 32, 32, actor.sp.to_s, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x - 6 + 48, y + 150 + 17 +13, 12, 32, "/", 1)#(x - 26 + 48, y + 34 + 17, 12, 32, "/", 1)
- self.contents.draw_text(x + 2 + 56, y + 150 + 17 +13, 32, 32, actor.maxsp.to_s)#(x - 24 + 56, y + 34 + 17, 32, 32, actor.maxsp.to_s)
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新光标矩形
- #--------------------------------------------------------------------------
- def update_cursor_rect
- if @index <= -2
- self.cursor_rect.empty
- elsif @index == -1
- self.cursor_rect.set(50, 0, self.width - 32, @item_max * 80)#(0, 0, self.width - 32, @item_max * 80)
- else
- self.cursor_rect.set(0, 0, 0, 0)#(0, @index * 80, self.width - 32, 80)
- end
- end
- end
复制代码
载图
![]() |
|