希忆 发表于 2014-11-30 07:15
一起才写了几十行,然后就要别人弄界面。。也是醉了。。
这样我是不知道如何下手写的。【我写那个 ...
这是用你的工程里的菜单改的效果···具体的一些细节和字体大小什么的还没动,因为前置技能的设置方法不同所以理论上是无限的···
我把if skill.former1[0] != 0 txt = "需要: " + $data_skills[skill.former1[0]].name + "|Lv.#{skill.former1[1]}" @actor.former1?(skill) ? change_color(system_color) : change_color(crisis_color) draw_text(x, y+ret*line_height, line_width, line_height,txt) ret += 1 end if skill.former2[0] != 0 txt = "需要: " + $data_skills[skill.former2[0]].name + "|Lv.#{skill.former2[1]}" @actor.former2?(skill) ? change_color(system_color) : change_color(crisis_color) draw_text(x, y+ret*line_height, line_width, line_height,txt) ret += 1 end if skill.former3[0] != 0 txt = "需要: " + $data_skills[skill.former3[0]].name + "|Lv.#{skill.former3[1]}" @actor.former3?(skill) ? change_color(system_color) : change_color(crisis_color) draw_text(x, y+ret*line_height, line_width, line_height,txt) ret += 1 end
if skill.former1[0] != 0
txt = "需要: " + $data_skills[skill.former1[0]].name + "|Lv.#{skill.former1[1]}"
@actor.former1?(skill) ? change_color(system_color) : change_color(crisis_color)
draw_text(x, y+ret*line_height, line_width, line_height,txt)
ret += 1
end
if skill.former2[0] != 0
txt = "需要: " + $data_skills[skill.former2[0]].name + "|Lv.#{skill.former2[1]}"
@actor.former2?(skill) ? change_color(system_color) : change_color(crisis_color)
draw_text(x, y+ret*line_height, line_width, line_height,txt)
ret += 1
end
if skill.former3[0] != 0
txt = "需要: " + $data_skills[skill.former3[0]].name + "|Lv.#{skill.former3[1]}"
@actor.former3?(skill) ? change_color(system_color) : change_color(crisis_color)
draw_text(x, y+ret*line_height, line_width, line_height,txt)
ret += 1
end
换成了这样的东西,前置技能全部写一个地方了
if Chd114::Skill::FrontSkill[skill.id][0]!=[] draw_text(x, y+ret*line_height, line_width, line_height,"所需技能") ret += 1 end for i in 0...Chd114::Skill::FrontSkill[skill.id][0].size#.keys.size draw_text(x, y+ret*line_height, line_width, line_height, $data_skills[Chd114::Skill::FrontSkill[skill.id][0].keys[i]].name+" Lv."+Chd114::Skill::FrontSkill[skill.id][0].values[i].to_s) ret += 1 end
if Chd114::Skill::FrontSkill[skill.id][0]!=[]
draw_text(x, y+ret*line_height, line_width, line_height,"所需技能")
ret += 1
end
for i in 0...Chd114::Skill::FrontSkill[skill.id][0].size#.keys.size
draw_text(x, y+ret*line_height, line_width, line_height, $data_skills[Chd114::Skill::FrontSkill[skill.id][0].keys[i]].name+" Lv."+Chd114::Skill::FrontSkill[skill.id][0].values[i].to_s)
ret += 1
end
|