| 赞 | 14 |
| VIP | |
| 好人卡 | |
| 积分 | 25 |
| 经验 | |
| 最后登录 | 2024-3-12 |
| 在线时间 | 912 小时 |
- 梦石
- 0
- 星屑
- 2457
- 在线时间
- 912 小时
- 注册时间
- 2014-10-14
- 回帖
- 1155

|
发表于 2017-8-9 20:12:01
|
显示全部楼层
[pre lang="ruby"]class Window_LxStatus < Window_Base
attr_reader :selected
def initialize(height, i)
super(0, i * height, Graphics.width, height)
@index = i
refresh
@selected = false
end
def refresh
contents.clear
change_color(normal_color)
actor = $game_party.members[@index]
draw_actor_xdrs_lx(actor, x + 130, 56)
draw_actor_graphic(actor, x + 35, 80)
draw_actor_name(actor, x, 0)
draw_actor_class(actor, x + 134, 28)
draw_actor_level(actor, x + 134, 0)
draw_actor_hp(actor, x + 300, 0 )
draw_actor_mp(actor, x + 300, 26)
end
def draw_current_and_max_values(x, y, width, current, max, color1, color2)
change_color(color1)
xr = x + width
if width < 96
draw_text(xr - 40, y, 42, line_height, current, 2)
else
draw_text(xr - 92, y, 42, line_height, current, 2)
change_color(color2)
draw_text(xr - 52, y, 12, line_height, "/", 2)
draw_text(xr - 42, y, 42, line_height, max, 2)
end
end
def selected=(selected)
@selected = selected
update_cursor
end
def update_cursor
if @selected
cursor_rect.set(0, 0, Graphics.width, height)
else
cursor_rect.empty
end
end
end
class Window_xz < Window_Command
def make_command_list
add_command("是", :ok)
add_command("否", :cancel)
end
end[/pre] |
|