本帖最后由 tseyik 于 2015-8-10 13:46 编辑 最簡単就是禁止調用菜単 自己用事件寫一個 按B就直接調用該事件 或者用選單編輯器做一個 https://rpg.blue/thread-378309-1-1.html |
![]() {:2_264:} 就是弄个合适的位置竟然弄了那么久 脚本: #encoding:utf-8 class Window_MenuSkillList < Window_Selectable attr_reader :skills def initialize super(400,0,144,416) make_skill_list open select(0) activate end def make_skill_list @skills = $game_party.members[0].skills idx = 0 @skills.each do |each_skill| draw_item(idx,each_skill.name) #msgbox(each_skill.name) idx += 1 end end def draw_item(index,text) draw_text(item_rect_for_text(index), text) end def item_max return @skills? @skills.size : 1 end end class Window_Status_SpecialChg < Window_Status def initialize(actor) super(actor) end def draw_block1(y) draw_actor_name(@actor, 4, y) draw_actor_class(@actor, 80, y) draw_actor_nickname(@actor, 128, y) end def draw_block2(y) draw_actor_face(@actor, 8, y) draw_basic_info(126, y) draw_exp_info(218, y) end def draw_block3(y) draw_parameters(32, y) draw_equipments(144, y) end def draw_actor_param(actor, x, y, param_id) change_color(system_color) draw_text(x, y, 120, line_height, Vocab::param(param_id)) change_color(normal_color) draw_text(x + 40, y, 36, line_height, actor.param(param_id), 2) end def draw_exp_info(x, y) s1 = @actor.max_level? ? "-" : @actor.exp s2 = @actor.max_level? ? "-" : @actor.next_level_exp - @actor.exp s_next = sprintf(Vocab::ExpNext, Vocab::level) change_color(system_color) draw_text(x-40, y + line_height * 0, 100, line_height, Vocab::ExpTotal) draw_text(x-40, y + line_height * 1, 100, line_height, s_next) change_color(normal_color) draw_text(x+60, y + line_height * 0, 60, line_height, s1, 2) draw_text(x+60, y + line_height * 1, 60, line_height, s2, 2) end end class Window_MenuSkillHelp < Window_Help def initialize super(3) close end end class Scene_Menu < Scene_Base def start super create_status_window create_skill_list end def create_status_window @status_window = Window_Status_SpecialChg.new($game_party.members[0]) @status_window.x = 0 @status_window.y = 0 @status_window.height = Graphics.height @status_window.width = 360 end def create_skill_list @skill_list = Window_MenuSkillList.new @skill_list.height = @status_window.height @skill_list.width = Graphics.width - @status_window.width @skill_list.x = @status_window.width @skill_list.y = 0 #@skill_list.set_handler(:cancel,method(:skill_list_cancel)) #这个不好用啦,直接重载update(好bao力 O(∩_∩)) @skill_list.set_handler(:ok, method(:skill_list_ok)) end def skill_list_ok @help ||= Window_MenuSkillHelp.new @help.set_text(@skill_list.skills[@skill_list.index].description) @help.open end def update super if Input.trigger?(:B) if @help != nil && @help.open? @help.close @skill_list.activate else SceneManager.return end end end end |
![]() ![]() 这样么? 脚本: #记得把原先va自带的Scene_Menu删掉,这个脚本才能正确运行 #encoding:utf-8 class Window_MenuSkillList < Window_Selectable attr_reader :skills def initialize super(400,0,144,416) make_skill_list open select(0) activate end def make_skill_list @skills = $game_party.members[0].skills idx = 0 @skills.each do |each_skill| draw_item(idx,each_skill.name) #msgbox(each_skill.name) idx += 1 end end def draw_item(index,text) draw_text(item_rect_for_text(index), text) end def item_max return @skills? @skills.size : 1 end end class Window_MenuSkillHelp < Window_Help def initialize super(3) close end end class Scene_Menu < Scene_Base def start super create_status_window create_skill_list end def create_status_window @status_window = Window_Status.new($game_party.members[0]) @status_window.x = 0 @status_window.y = 0 @status_window.height = Graphics.height @status_window.width = 360 end def create_skill_list @skill_list = Window_MenuSkillList.new @skill_list.height = @status_window.height @skill_list.width = Graphics.width - @status_window.width @skill_list.x = @status_window.width @skill_list.y = 0 #@skill_list.set_handler(:cancel,method(:skill_list_cancel)) #这个不好用啦,直接重载update(好bao力 O(∩_∩)) @skill_list.set_handler(:ok, method(:skill_list_ok)) end def skill_list_ok @help ||= Window_MenuSkillHelp.new @help.set_text(@skill_list.skills[@skill_list.index].description) @help.open end def update super if Input.trigger?(:B) if @help != nil && @help.open? @help.close @skill_list.activate else SceneManager.return end end end end |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-7-22 08:00
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.