赞 | 0 |
VIP | 1 |
好人卡 | 0 |
积分 | 1 |
经验 | 3179 |
最后登录 | 2013-10-25 |
在线时间 | 140 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 66
- 在线时间
- 140 小时
- 注册时间
- 2012-2-6
- 帖子
- 384
|
5楼
楼主 |
发表于 2012-2-23 17:47:08
|
只看该作者
本帖最后由 杂兵天下 于 2012-2-24 01:15 编辑
啊
我从YEA中成功提取除了界面
版主把分还我,关闭帖子吧!
$imported = {} if $imported.nil? module YEA module BATTLE BATTLESTATUS_NAME_FONT_SIZE = 20 BATTLESTATUS_TEXT_FONT_SIZE = 16 BATTLESTATUS_HPGAUGE_Y_PLUS = 11 BATTLESTATUS_CENTER_FACES = false end end class Window_BattleStatus < Window_Selectable def initialize super(0, 0, window_width, window_height) self.openness = 0 @party = $game_party.battle_members.clone end def col_max; return $game_party.max_battle_members; end def battle_members; return $game_party.battle_members; end def actor; return battle_members[@index]; end def update super return if @party == $game_party.battle_members @party = $game_party.battle_members.clone refresh end def draw_item(index) return if index.nil? clear_item(index) actor = battle_members[index] rect = item_rect(index) return if actor.nil? draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?) draw_actor_name(actor, rect.x, rect.y, rect.width-8) draw_actor_icons(actor, rect.x, line_height*1, rect.width) gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4) dw = rect.width/2-2 dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE draw_actor_tp(actor, rect.x+2, line_height*3, dw) dw = rect.width - rect.width/2 - 2 draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw) end def item_rect(index) rect = Rect.new rect.width = contents.width / $game_party.max_battle_members rect.height = contents.height rect.x = index * rect.width if YEA::BATTLE::BATTLESTATUS_CENTER_FACES rect.x += (contents.width - $game_party.members.size * rect.width) / 2 end rect.y = 0 return rect end def draw_face(face_name, face_index, dx, dy, enabled = true) bitmap = Cache.face(face_name) fx = [(96 - item_rect(0).width + 1) / 2, 0].max fy = face_index / 4 * 96 + 2 fw = [item_rect(0).width - 4, 92].min rect = Rect.new(fx, fy, fw, 92) rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92) contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha) bitmap.dispose end def draw_actor_name(actor, dx, dy, dw = 112) reset_font_settings contents.font.size = YEA::BATTLE::BATTLESTATUS_NAME_FONT_SIZE change_color(hp_color(actor)) draw_text(dx+24, dy, dw-24, line_height, actor.name) end def draw_current_and_max_values(dx, dy, dw, current, max, color1, color2) change_color(color1) draw_text(dx, dy, dw, line_height, current.group, 2) end def draw_actor_hp(actor, dx, dy, width = 124) draw_gauge(dx, dy, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2) change_color(system_color) cy = (Font.default_size - contents.font.size) / 2 + 1 draw_text(dx+2, dy+cy, 30, line_height, Vocab::hp_a) draw_current_and_max_values(dx, dy+cy, width, actor.hp, actor.mhp, hp_color(actor), normal_color) end def draw_actor_mp(actor, dx, dy, width = 124) draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2) change_color(system_color) cy = (Font.default_size - contents.font.size) / 2 + 1 draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a) draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp, mp_color(actor), normal_color) end def draw_actor_tp(actor, dx, dy, width = 124) draw_gauge(dx, dy, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2) change_color(system_color) cy = (Font.default_size - contents.font.size) / 2 + 1 draw_text(dx+2, dy+cy, 30, line_height, Vocab::tp_a) change_color(tp_color(actor)) draw_text(dx + width - 42, dy+cy, 42, line_height, actor.tp.to_i, 2) end end
$imported = {} if $imported.nil?
module YEA
module BATTLE
BATTLESTATUS_NAME_FONT_SIZE = 20
BATTLESTATUS_TEXT_FONT_SIZE = 16
BATTLESTATUS_HPGAUGE_Y_PLUS = 11
BATTLESTATUS_CENTER_FACES = false
end
end
class Window_BattleStatus < Window_Selectable
def initialize
super(0, 0, window_width, window_height)
self.openness = 0
@party = $game_party.battle_members.clone
end
def col_max; return $game_party.max_battle_members; end
def battle_members; return $game_party.battle_members; end
def actor; return battle_members[@index]; end
def update
super
return if @party == $game_party.battle_members
@party = $game_party.battle_members.clone
refresh
end
def draw_item(index)
return if index.nil?
clear_item(index)
actor = battle_members[index]
rect = item_rect(index)
return if actor.nil?
draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
draw_actor_name(actor, rect.x, rect.y, rect.width-8)
draw_actor_icons(actor, rect.x, line_height*1, rect.width)
gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4)
dw = rect.width/2-2
dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
draw_actor_tp(actor, rect.x+2, line_height*3, dw)
dw = rect.width - rect.width/2 - 2
draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)
end
def item_rect(index)
rect = Rect.new
rect.width = contents.width / $game_party.max_battle_members
rect.height = contents.height
rect.x = index * rect.width
if YEA::BATTLE::BATTLESTATUS_CENTER_FACES
rect.x += (contents.width - $game_party.members.size * rect.width) / 2
end
rect.y = 0
return rect
end
def draw_face(face_name, face_index, dx, dy, enabled = true)
bitmap = Cache.face(face_name)
fx = [(96 - item_rect(0).width + 1) / 2, 0].max
fy = face_index / 4 * 96 + 2
fw = [item_rect(0).width - 4, 92].min
rect = Rect.new(fx, fy, fw, 92)
rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92)
contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha)
bitmap.dispose
end
def draw_actor_name(actor, dx, dy, dw = 112)
reset_font_settings
contents.font.size = YEA::BATTLE::BATTLESTATUS_NAME_FONT_SIZE
change_color(hp_color(actor))
draw_text(dx+24, dy, dw-24, line_height, actor.name)
end
def draw_current_and_max_values(dx, dy, dw, current, max, color1, color2)
change_color(color1)
draw_text(dx, dy, dw, line_height, current.group, 2)
end
def draw_actor_hp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::hp_a)
draw_current_and_max_values(dx, dy+cy, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end
def draw_actor_mp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a)
draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp,
mp_color(actor), normal_color)
end
def draw_actor_tp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::tp_a)
change_color(tp_color(actor))
draw_text(dx + width - 42, dy+cy, 42, line_height, actor.tp.to_i, 2)
end
end
恩,以上是究极精简版。保留了所有我所求的功能,去掉了其他无用的程序
@仲秋启明@zhixin1997@各种压力的猫君@亿万星辰@fux2@灼眼的夏娜
我知道很多人其实是挂名版主,但是还是召唤下。
谢谢。��������� |
|