Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # // Last Modified :06/08/2011
- #==============================================================================#
- # Window_FaceTab
- #==============================================================================#
- class Window_FaceTab < IRS::Sprite_FaceTab
- #--------------------------------------------------------------------------#
- # * super method :draw_background
- #--------------------------------------------------------------------------#
- def draw_background()
- super() # // Comment out to remove black background
- end
- end
- #==============================================================================#
- # Window_FaceTabs
- #==============================================================================#
- class Window_FaceTabs < FRV::Container_Base # // Container
- attr_accessor :active_index
- #--------------------------------------------------------------------------#
- # * super method :initialize
- #--------------------------------------------------------------------------#
- def initialize( x, y, active_index )
- super( x, y )
- @active_index = active_index
- @tabs = []
- @spacing = 116
- for i in 0...$game_party.members.size
- mem = $game_party.members[i]
- @tabs << Window_FaceTab.new( mem, 0, 0, 112, 32 )
- end
- @width = @x+(@tabs.size*@spacing)
- update()
- end
- #--------------------------------------------------------------------------#
- # * super method :x=
- #--------------------------------------------------------------------------#
- def x=( new_x )
- super( new_x )
- for i in 0...@tabs.size()
- tab = @tabs[i]
- tab.x = @x+(i*@spacing)
- end
- end
- #--------------------------------------------------------------------------#
- # * super method :y=
- #--------------------------------------------------------------------------#
- def y=( new_y )
- super( new_y )
- for i in 0...@tabs.size()
- tab = @tabs[i]
- tab.y = @y
- end
- end
- #--------------------------------------------------------------------------#
- # * super method :z=
- #--------------------------------------------------------------------------#
- def z=( new_z )
- super( new_z )
- for i in 0...@tabs.size()
- tab = @tabs[i]
- tab.z = @z
- end
- end
- #--------------------------------------------------------------------------#
- # * new method :dispose
- #--------------------------------------------------------------------------#
- def dispose()
- @tabs.each { |tab| tab.dispose }
- @tabs.clear()
- end
- #--------------------------------------------------------------------------#
- # * new method :update
- #--------------------------------------------------------------------------#
- def update()
- for i in 0...@tabs.size()
- tab = @tabs[i]
- tab.x = @x+(i*@spacing)
- tab.y = @y
- tab.z = @z
- tab.opacity = @active_index == i ? 255 : 128
- end
- @width = @x+(@tabs.size*@spacing)
- end
- end
- #==============================================================================#
- # Window_SkillHelp
- #==============================================================================#
- class Window_SkillHelp < IRS::Sprite_Help ; end
- #==============================================================================#
- # Scene_Skill
- #==============================================================================#
- class Scene_Skill < Scene_Base
- #--------------------------------------------------------------------------#
- # * overwrite method :start
- #--------------------------------------------------------------------------#
- def start()
- super()
- create_menu_background()
- @actor = $game_party.members[@actor_index]
- @viewport = Viewport.new( 0, 0, Graphics.width, Graphics.height )
- @help_window = Window_SkillHelp.new( 0, 0, Graphics.width, 32 )
- @help_window.viewport = @viewport
- @status_window = Window_SkillStatus.new( 0, @help_window.height, @actor )
- @status_window.viewport = @viewport
- @skill_window = Window_Skill.new( 0, @help_window.height + @status_window.height,
- Graphics.width, Graphics.height - (@help_window.height + @status_window.height + 32)-32,
- @actor )
- @skill_window.viewport = @viewport
- @skill_window.help_window = @help_window
- @target_window = Window_MenuStatus.new( 0, 0 )
- @inputhelp_window = Window_SkillHelp.new( 0, Graphics.height-32, Graphics.width, 32 )
- @inputhelp_window.align = 1
- @inputhelp_window.set_text("Use A and S to switch Characters")
- @face_tabs_window = Window_FaceTabs.new( 0, @inputhelp_window.y - 32, @actor_index )
- @face_tabs_window.x = (Graphics.width - @face_tabs_window.width) / 2
- hide_target_window()
- # // ----------------------------------------------------------------- // #
- @menuback_sprite.bitmap = Cache.system( "Menu_background" )
- @menuback_sprite.opacity= 255
- end
- #--------------------------------------------------------------------------#
- # * overwrite method :terminate
- #--------------------------------------------------------------------------#
- def terminate()
- super()
- dispose_menu_background()
- @help_window.dispose()
- @status_window.dispose()
- @skill_window.dispose()
- @target_window.dispose()
- @inputhelp_window.dispose()
- @face_tabs_window.dispose()
- end
- #--------------------------------------------------------------------------#
- # * alias method :update
- #--------------------------------------------------------------------------#
- alias :frv_skill_scn_update :update unless $@
- def update()
- @face_tabs_window.update()
- frv_skill_scn_update()
- end
- #--------------------------------------------------------------------------#
- # * overwrite method :update_skill_selection
- #--------------------------------------------------------------------------#
- def update_skill_selection()
- if Input.trigger?(Input::B)
- Sound.play_cancel()
- return_scene()
- elsif Input.trigger?(Input::Y)
- Sound.play_cursor()
- next_actor()
- elsif Input.trigger?(Input::X)
- Sound.play_cursor()
- prev_actor()
- elsif Input.trigger?(Input::C)
- @skill = @skill_window.skill()
- if @skill != nil
- @actor.last_skill_id = @skill.id
- end
- if @actor.skill_can_use?(@skill)
- Sound.play_decision()
- determine_skill()
- else
- Sound.play_buzzer()
- end
- end
- end
- end
- #=*==========================================================================*=#
- # ** END OF FILE
- #=*==========================================================================*=#
Advertisement
Add Comment
Please, Sign In to add comment