Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Scene_Skill
- #--------------------------------------------------------------------------
- # ● Create Item Window
- #--------------------------------------------------------------------------
- def create_item_window
- @skill_window = []
- index = 0
- window_max = @actor.added_skill_types.size
- window_max = 1 if window_max == 0
- for item in 0...window_max
- @skill_window.push(Window_SkillList_Menu.new(196,95,205,240))
- @skill_window[index].setup(@actor,@actor.added_skill_types[index],index)
- @skill_window[index].help_window = @help_window
- @skill_window[index].set_handler(:ok, method(:on_item_ok))
- @skill_window[index].set_handler(:cancel, method(:on_item_cancel))
- @skill_window[index].active = false
- @skill_window[index].index = -1
- @skill_window[index].opacity = 0
- @skill_window[index].contents_opacity = 0
- @item_slide_range = [@skill_window[index].x, @skill_window[index].x + 50]
- @skill_window[index].x = @item_slide_range[1]
- index += 1
- end
- @item_pre_index = @skill_window[@command_window.index].index
- @old_command_index = @skill_window[@command_window.index].index
- end
- #--------------------------------------------------------------------------
- # ● Update Active
- #--------------------------------------------------------------------------
- def update_active
- if @last_phase != @phase
- @last_phase = @phase
- if @phase == 0
- @skill_window[@command_window.index].active = false
- @command_window.active = true
- @actor_window.active = false
- elsif @phase == 1
- @skill_window[@command_window.index].active = true
- @command_window.active = false
- @actor_window.active = false
- elsif @phase == 2
- @skill_window[@command_window.index].active = false
- @command_window.active = false
- @actor_window.active = true
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● Update Windows
- #--------------------------------------------------------------------------
- def update_windows
- @press_lag -= 1 if @press_lag > 0
- return if @command_window == nil
- for skw in @skill_window
- skw.update unless @press_lag > 0
- if skw.windows_index == @command_window.index
- #~ skw.active = true
- if @phase == 0
- skw.index = 0 if skw.index < 0 or skw.index >= skw.item_max
- end
- skw.visible = true
- else
- skw.visible = false
- skw.active = false
- end
- end
- #@skill_window[@command_window.index].update
- @command_window.update
- @actor_window.update
- update_actor_window_slide
- update_skill_list_slide
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement