Project1
标题:
关于状态菜单的修改
[打印本页]
作者:
莫言别离
时间:
2014-9-15 18:03
标题:
关于状态菜单的修改
本帖最后由 莫言别离 于 2014-9-15 18:24 编辑
想修改一下状态菜单。
QQ图片20140915175033.jpg
(142.08 KB, 下载次数: 21)
下载附件
保存到相册
2014-9-15 18:24 上传
1、怎么才能把红框的头像位置删除,用行走图代替?
2、怎么才能把绿框的东西删除?
3、怎么才能删除蓝框的东西然后把黄框的移上去?
问题比较多...
作者:
VIPArcher
时间:
2014-9-15 18:03
本帖最后由 VIPArcher 于 2014-9-15 18:40 编辑
这样?
图
#encoding:utf-8
#==============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
# 状态画面中,显示角色基本信息的窗口。
#==============================================================================
class Window_Status < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, Graphics.width, Graphics.height)
@actor = actor
refresh
activate
end
#--------------------------------------------------------------------------
# ● 设置角色
#--------------------------------------------------------------------------
def actor=(actor)
return if @actor == actor
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_block1 (line_height * 0)
draw_horz_line(line_height * 1)
draw_block2 (line_height * 2)
draw_horz_line(line_height * 6)
draw_block3 (line_height * 7)
end
#--------------------------------------------------------------------------
# ● 绘制区域 1
#--------------------------------------------------------------------------
def draw_block1(y)
draw_actor_name(@actor, 4, y)
draw_actor_class(@actor, 128, y)
draw_actor_nickname(@actor, 288, y)
end
#--------------------------------------------------------------------------
# ● 绘制区域 2
#--------------------------------------------------------------------------
def draw_block2(y)
draw_actor_graphic(@actor, 64, 96)
draw_basic_info(136, y)
end
#--------------------------------------------------------------------------
# ● 绘制区域 3
#--------------------------------------------------------------------------
def draw_block3(y)
draw_description(4, y)
end
#--------------------------------------------------------------------------
# ● 绘制水平线
#--------------------------------------------------------------------------
def draw_horz_line(y)
line_y = y + line_height / 2 - 1
contents.fill_rect(0, line_y, contents_width, 2, line_color)
end
#--------------------------------------------------------------------------
# ● 获取水平线的颜色
#--------------------------------------------------------------------------
def line_color
color = normal_color
color.alpha = 48
color
end
#--------------------------------------------------------------------------
# ● 绘制基本信息
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + line_height * 0)
draw_actor_icons(@actor, x, y + line_height * 1)
draw_actor_hp(@actor, x, y + line_height * 2)
draw_actor_mp(@actor, x, y + line_height * 3)
end
#--------------------------------------------------------------------------
# ● 绘制说明
#--------------------------------------------------------------------------
def draw_description(x, y)
draw_text_ex(x, y, @actor.description)
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1