Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Gamepad Extender Game Adapter
- # by Jono99
- #------------------------------------------------------------------------------
- # This allows the game commands to be handled in a way more friendly to controller
- # input. Based off Gamepad Extender by Lone Wolf and requires Gamepad Extender
- # in order to function.
- # Link to download Gamepad Extender: http://forums.rpgmakerweb.com/index.php?/topic/1284-gamepad-extender-v11-2202015/
- #------------------------------------------------------------------------------
- # Changelog
- # 1.0.0: Initial release
- # 1.0.1: Fixed bug where the save menu would not accept input from the analogue stick and the dpad's input would be duplicated (only occured when MenuInput was set to 2)
- # 1.0.2: Removed checks to see if values in GEGAOptions are acceptable values (they caused a problem where the script would not run in StartForPause was set to false)
- #==============================================================================
- module GEGAOptions
- # Use the Start button instead of the B button to pause the game
- StartForPause = true
- # Determine what input device is used for the menus.
- # 0 for just the dpad
- # 1 for just the left analogue stick
- # 2 for both
- MenuInput = 2
- # Determine what input device is used for moving around the map.
- # 0 for just the dpad
- # 1 for just the left analogue stick
- # 2 for both
- MoveInput = 2
- end
- #==============================================================================
- # DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING!
- #==============================================================================
- if defined?(WolfPad) == nil
- msgbox("WARNING: GamePad Extender is either missing or executes sometime after this. To avoid issues, GE Game Adapter will not execute!")
- else
- module WolfPad
- def self.dird4(p_i = 0)
- if press?(:UP, p_i)
- 8
- elsif press?(:RIGHT, p_i)
- 6
- elsif press?(:LEFT, p_i)
- 4
- elsif press?(:DOWN, p_i)
- 2
- else
- 0
- end
- end
- def self.dird8(p_i = 0)
- if press?(:UP, p_i) and press?(:LEFT, p_i)
- 7
- elsif press?(:UP, p_i) and press?(:RIGHT, p_i)
- 9
- elsif press?(:DOWN, p_i) and press?(:LEFT, p_i)
- 1
- elsif press?(:DOWN, p_i) and press?(:RIGHT, p_i)
- 3
- else
- dird4(p_i)
- end
- end
- end
- class Game_Player < Game_Character
- # Update input for bringing up the quick tool menu
- def update_quick_tool_button
- if Input.trigger?(QUICK_TOOL_SELECT::QUICK_TOOL_SELECT_BUTTON)
- return unless can_use_quick_tool_button?
- SceneManager.call(Scene_Quick_Skill_Tool)
- end
- end
- # Update input for picking up objects
- def update_pickup_command
- if Input.trigger?(PadConfig.confirm)
- throw_event if can_check_throw_event?
- check_event_pickup([0,1,2]) if can_check_pickup_event?
- end
- end
- # Update input for backdash
- def update_backdash_button # And front dash!
- backdash_distance = 2 # Also used as frontdash distance
- if @backdash_cooldown # Also used as frontdash cooldown
- @backdash_cooldown -= 1
- return if @backdash_cooldown > 0
- end
- if Input.trigger?(PadConfig.dash)
- if backstep_accessories_equipped?
- @backdash_cooldown = 27
- # YIN
- pose_suffix = Kadafi::DashBackSuffix
- make_pose(pose_suffix, @backdash_cooldown - 12)
- image_only_on_dash(true)
- Audio.se_play('Audio/ME/dash', 80, 150)
- d = 10 - direction
- a = 0
- if @diagonal_direction != 0
- backdash_distance = (backdash_distance * OrangeMovement::Tile_Sections/Math.sqrt(2)).to_i/OrangeMovement::Tile_Sections
- end
- backdash_distance.times do
- OrangeMovement::Tile_Sections.times do
- if @diagonal_direction != 0
- case @diagonal_direction
- when 1
- if (diagonal_passable?(@x+a, @y-a, 6, 8) && diagonal_passable?(@x+(a*2), @y-(a*2), 6, 8))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x+a, @y-a, 6, 8)
- a += my_step_size
- end
- when 3
- if (diagonal_passable?(@x-a, @y-a, 4, 8) && diagonal_passable?(@x-(a*2), @y-(a*2), 4, 8))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x-a, @y-a, 4, 8)
- a += my_step_size
- end
- when 7
- if (diagonal_passable?(@x+a, @y+a, 6, 2) && diagonal_passable?(@x+(a*2), @y+(a*2), 6, 2))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x+a, @y+a, 6, 2)
- a += my_step_size
- end
- when 9
- if (diagonal_passable?(@x-a, @y+a, 4, 2) && diagonal_passable?(@x-(a*2), @y+(a*2), 4, 2))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x-a, @y+a, 4, 2)
- a += my_step_size
- end
- end
- else
- case @direction
- when 2; a += my_step_size if passable?(@x, @y-a, d)
- when 4; a += my_step_size if passable?(@x+a, @y, d)
- when 6; a += my_step_size if passable?(@x-a, @y, d)
- when 8; a += my_step_size if passable?(@x, @y+a, d)
- end
- end
- end
- end
- if @diagonal_direction != 0
- case @diagonal_direction
- when 1
- @x += a
- @y -= a
- when 3
- @x -= a
- @y -= a
- when 7
- @x += a
- @y += a
- when 9
- @x -= a
- @y += a
- end
- else
- case @direction
- when 2
- @x += 0
- @y -= a
- when 8
- @x += 0
- @y += a
- when 4
- @x += a
- @y += 0
- when 6
- @x -= a
- @y += 0
- end
- end
- @jump_peak = 3 + a.abs - @move_speed
- #~ p @jump_peak
- @jump_count = @jump_peak * 3.9
- @stop_count = 0
- straighten
- # Front Dash
- elsif forwardstep_accessories_equipped?
- @backdash_cooldown = 27
- # YIN
- pose_suffix = Kadafi::DashForwardSuffix
- make_pose(pose_suffix, @backdash_cooldown - 12)
- image_only_on_dash(true)
- Audio.se_play('Audio/ME/dash', 80, 150)
- d = direction
- a = 0
- if @diagonal_direction != 0
- backdash_distance = (backdash_distance * OrangeMovement::Tile_Sections/Math.sqrt(2)).to_i/OrangeMovement::Tile_Sections
- end
- backdash_distance.times do
- OrangeMovement::Tile_Sections.times do
- if @diagonal_direction != 0
- case @diagonal_direction
- when 1
- if (diagonal_passable?(@x-a, @y+a, 6, 8) && diagonal_passable?(@x-(a*2), @y+(a*2), 6, 8))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x-a, @y+a, 6, 8)
- a += my_step_size
- end
- when 3
- if (diagonal_passable?(@x+a, @y+a, 4, 8) && diagonal_passable?(@x+(a*2), @y+(a*2), 4, 8))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x+a, @y+a, 4, 8)
- a += my_step_size
- end
- when 7
- if (diagonal_passable?(@x-a, @y-a, 6, 2) && diagonal_passable?(@x-(a*2), @y-(a*2), 6, 2))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x-a, @y-a, 6, 2)
- a += my_step_size
- end
- when 9
- if (diagonal_passable?(@x+a, @y-a, 4, 2) && diagonal_passable?(@x+(a*2), @y-(a*2), 4, 2))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x+a, @y-a, 4, 2)
- a += my_step_size
- end
- end
- else
- case @direction
- when 2; a += my_step_size if passable?(@x, @y+a, d)
- when 4; a += my_step_size if passable?(@x-a, @y, d)
- when 6; a += my_step_size if passable?(@x+a, @y, d)
- when 8; a += my_step_size if passable?(@x, @y-a, d)
- end
- end
- end
- end
- if @diagonal_direction != 0
- case @diagonal_direction
- when 1
- @x -= a
- @y += a
- when 3
- @x += a
- @y += a
- when 7
- @x -= a
- @y -= a
- when 9
- @x += a
- @y -= a
- end
- else
- case @direction
- when 2
- @x += 0
- @y += a
- when 8
- @x += 0
- @y -= a
- when 4
- @x -= a
- @y += 0
- when 6
- @x += a
- @y += 0
- end
- end
- @jump_peak = 3 + a.abs - @move_speed
- @jump_count = @jump_peak * 3.9
- @stop_count = 0
- straighten
- end
- end
- end
- #--------------------------------------------------------------------------
- # * Processing When Not Moving
- # last_moving : Was it moving previously?
- #--------------------------------------------------------------------------
- def update_nonmoving(last_moving)
- return if $game_map.interpreter.running?
- if last_moving
- $game_party.on_player_walk
- return if check_touch_event
- end
- if movable? && Input.trigger?(PadConfig.confirm)
- return if get_on_off_vehicle
- return if check_action_event
- end
- update_encounter if last_moving
- end
- # YIN XAS and other stuff that requires input
- alias input_dash? dash?
- def dash?
- if rush_accessories_equipped? && Input.press?(PadConfig.dash)
- return true if @rush_delay > Kadafi::RushDelay
- return false if @rush_delay == 0
- end
- return input_dash?
- end
- #~ def update_charge_button
- #~ return unless can_charge_command?
- #~ if Input.press?(PadConfig.attack) and ENABLE_ACTION_1_BUTTON
- #~ update_charge_effect(0)
- #~ reset_charge_temp if Input.press?(PadConfig.attack2) and ENABLE_ACTION_2_BUTTON
- #~ elsif Input.press?(PadConfig.attack2)
- #~ update_charge_effect(1)
- #~ reset_charge_temp if Input.press?(PadConfig.attack)
- #~ else
- #~ if self.battler.x_charge_action[2] >= self.battler.x_charge_action[1]
- #~ self.shoot(self.battler.x_charge_action[0])
- #~ end
- #~ reset_charge_temp
- #~ end
- #~ end
- def update_change_leader_button
- if Input.trigger?(PadConfig.page_down)
- return unless can_use_change_leader_command?
- change_leader
- end
- end
- def update_action_1_button
- if Input.trigger?(PadConfig.attack)
- type = 0
- return unless can_use_weapon_command?
- return if execute_combo?(type)
- check_equipped_action(type)
- action_id = self.battler.x_action1_id
- return if action_id == 0
- return if state_seal_command?(type)
- self.shoot(action_id)
- end
- end
- #~ def update_action_2_button
- #~ if Input.trigger?(PadConfig.attack2)
- #~ if self.battler.equips[1].is_a?(RPG::Weapon)
- #~ type = 1
- #~ return unless can_use_weapon_command?
- #~ return if execute_combo?(type)
- #~ check_equipped_action(type)
- #~ action_id = self.battler.x_action2_id
- #~ return if action_id == 0
- #~ return if state_seal_command?(type)
- #~ self.shoot(action_id)
- #~ return
- #~ end
- #~ end
- #~ update_shield_button
- #~ end
- #~ def update_shield_button
- #~ if Input.press?(PadConfig.attack2)
- #~ if can_use_shield_command?
- #~ unless self.battler.shield
- #~ shield = self.battler.equips[1]
- #~ if shield.note =~ /<Action>/
- #~ if shield.note =~ /<Pose = (\w+)>/
- #~ make_pose($1.to_s, 2)
- #~ end
- #~ else
- #~ self.battler.shield = false
- #~ return
- #~ end
- #~ end
- #~ self.x_pose_duration = 2
- #~ self.battler.shield = true
- #~ update_shield_diretion_button
- #~ else
- #~ self.battler.shield = false
- #~ end
- #~ else
- #~ self.battler.shield = false
- #~ end
- #~ end
- def update_skill_button
- if Input.press?(PadConfig.skill)
- type = 2
- return unless can_use_skill_command?
- return if execute_combo?(type)
- check_equipped_action(type)
- action_id = self.battler.skill_id
- return if action_id == 0
- return if state_seal_command?(type)
- self.shoot(action_id)
- elsif Input.press?(PadConfig.skill2)
- type = 2
- return unless can_use_skill_command?
- return if execute_combo?(type)
- check_equipped_action(type)
- action_id = self.battler.skill2_id
- return if action_id == 0
- return if state_seal_command?(type)
- self.shoot(action_id)
- end
- end
- #~ def update_item_button
- #~ if (Input.press?(PadConfig.skill) && Input.trigger?(PadConfig.attack2))
- #~ type = 3
- #~ return unless can_use_item_command?
- #~ return if execute_combo?(type)
- #~ check_equipped_action(type)
- #~ action_id = self.battler.x_item_id
- #~ return if action_id == 0
- #~ return if state_seal_command?(type)
- #~ self.shoot(action_id)
- #~ end
- #~ end
- def can_dash?
- return false if @backdash_cooldown
- return false unless XAS_BUTTON::ENABLE_DASH_BUTTON
- return false if self.battler.shield
- return true if Input.press?(PadConfig.dash)
- @dash_active = false
- return false
- end
- end
- class Window_Selectable
- #--------------------------------------------------------------------------
- # * Cursor Movement Processing
- #--------------------------------------------------------------------------
- def process_cursor_move
- return unless cursor_movable?
- last_index = @index
- if WolfPad.plugged_in?
- gega_process_cursor_move_input(:UP, :DOWN, :LEFT, :RIGHT) if GEGAOptions::MenuInput == 0 || GEGAOptions::MenuInput == 2
- gega_process_cursor_move_input(:L_UP, :L_DOWN, :L_LEFT, :L_RIGHT) if GEGAOptions::MenuInput > 0
- else
- gega_process_cursor_move_input(:UP, :DOWN, :LEFT, :RIGHT)
- end
- cursor_pagedown if !handle?(:pagedown) && Input.trigger?(PadConfig.page_down)
- cursor_pageup if !handle?(:pageup) && Input.trigger?(PadConfig.page_up)
- Sound.play_cursor if @index != last_index
- end
- #~ def gega_process_cursor_move_input(up, down, left, right)
- #~ if PadConfig.move_down && PadConfig.move_down != :_down
- #~ cursor_down (Input.trigger?(PadConfig.move_down)) if Input.repeat?(PadConfig.move_down)
- #~ else
- #~ cursor_down (Input.trigger?(down)) if Input.repeat?(down)
- #~ end
- #~ if PadConfig.move_up && PadConfig.move_up != :_up
- #~ cursor_up (Input.trigger?(PadConfig.move_up)) if Input.repeat?(PadConfig.move_up)
- #~ else
- #~ cursor_up (Input.trigger?(up)) if Input.repeat?(up)
- #~ end
- #~ if PadConfig.move_right && PadConfig.move_right != :_right
- #~ cursor_right(Input.trigger?(PadConfig.move_right)) if Input.repeat?(PadConfig.move_right)
- #~ else
- #~ cursor_right(Input.trigger?(right)) if Input.repeat?(right)
- #~ end
- #~ if PadConfig.move_left && PadConfig.move_left != :_left
- #~ cursor_left(Input.trigger?(PadConfig.move_left)) if Input.repeat?(PadConfig.move_left)
- #~ else
- #~ cursor_left (Input.trigger?(left)) if Input.repeat?(left)
- #~ end
- #~ end
- def gega_process_cursor_move_input(up, down, left, right)
- pad_down = PadConfig.move_down && PadConfig.move_down != :_down
- if Input.repeat?(down) || Input.repeat?(pad_down ? PadConfig.move_down : down)
- cursor_down(Input.trigger?(down) || Input.trigger?(pad_down ? PadConfig.move_down : down))
- end
- pad_up = PadConfig.move_up && PadConfig.move_up != :_up
- if Input.repeat?(up) || Input.repeat?(pad_up ? PadConfig.move_up : up)
- cursor_up(Input.trigger?(up) || Input.trigger?(pad_up ? PadConfig.move_up : up))
- end
- pad_right = PadConfig.move_right && PadConfig.move_right != :_right
- if Input.repeat?(right) || Input.repeat?(pad_right ? PadConfig.move_right : right)
- cursor_right(Input.trigger?(right) || Input.trigger?(pad_right ? PadConfig.move_right : right))
- end
- pad_left = PadConfig.move_left && PadConfig.move_left != :_left
- if Input.repeat?(left) || Input.repeat?(pad_left ? PadConfig.move_left : left)
- cursor_left(Input.trigger?(left) || Input.trigger?(pad_left ? PadConfig.move_left : left))
- end
- end
- #--------------------------------------------------------------------------
- # * Handling Processing for OK and Cancel Etc.
- #--------------------------------------------------------------------------
- def process_handling
- return unless open? && active
- return process_ok if ok_enabled? && Input.trigger?(PadConfig.confirm)
- return process_cancel if cancel_enabled? && Input.trigger?(PadConfig.cancel)
- return process_pagedown if handle?(:pagedown) && Input.trigger?(PadConfig.page_down)
- return process_pageup if handle?(:pageup) && Input.trigger?(PadConfig.page_up)
- end
- end
- class Window_ShopNumber
- #--------------------------------------------------------------------------
- # * Update Quantity
- #--------------------------------------------------------------------------
- def update_number
- if WolfPad.plugged_in?
- gega_update_number_input(:RIGHT, :LEFT, :UP, :DOWN) if GEGAOptions::MenuInput == 0 || GEGAOptions::MenuInput == 2
- gega_update_number_input(:L_RIGHT, :L_LEFT, :L_UP, :L_DOWN) if GEGAOptions::MenuInput > 0
- else
- gega_update_number_input(:RIGHT, :LEFT, :UP, :DOWN)
- end
- end
- end
- def gega_update_number_input(right, left, up, down)
- change_number(1) if Input.repeat?(right)
- change_number(-1) if Input.repeat?(left)
- change_number(10) if Input.repeat?(up)
- change_number(-10) if Input.repeat?(down)
- end
- class Window_NameInput
- #--------------------------------------------------------------------------
- # * Handling Processing for OK and Cancel Etc.
- #--------------------------------------------------------------------------
- def process_handling
- return unless open? && active
- process_jump if Input.trigger?(:_shift) && WolfPad.plugged_in? == false
- process_back if Input.repeat?(PadConfig.cancel)
- process_ok if Input.trigger?(PadConfig.confirm)
- end
- end
- class Window_NumberInput
- #--------------------------------------------------------------------------
- # * Cursor Movement Processing
- #--------------------------------------------------------------------------
- def process_cursor_move
- return unless active
- last_index = @index
- if WolfPad.plugged_in?
- gega_process_cursor_move_input(:LEFT, :RIGHT) if GEGAOptions::MenuInput == 0 || GEGAOptions::MenuInput == 2
- gega_process_cursor_move_input(:L_LEFT, :L_RIGHT) if GEGAOptions::MenuInput > 0
- else
- gega_process_cursor_move_input(:LEFT, :RIGHT)
- end
- Sound.play_cursor if @index != last_index
- end
- #~ def gega_process_cursor_move_input(left, right)
- #~ if PadConfig.move_right && PadConfig.move_right != :_right
- #~ cursor_right(Input.trigger?(PadConfig.move_right)) if Input.repeat?(PadConfig.move_right)
- #~ else
- #~ cursor_right(Input.trigger?(right)) if Input.repeat?(right)
- #~ end
- #~ if PadConfig.move_left && PadConfig.move_left != :_left
- #~ cursor_left(Input.trigger?(PadConfig.move_left)) if Input.repeat?(PadConfig.move_left)
- #~ else
- #~ cursor_left (Input.trigger?(left)) if Input.repeat?(left)
- #~ end
- #~ end
- def gega_process_cursor_move_input(left, right)
- pad_right = PadConfig.move_right && PadConfig.move_right != :_right
- if Input.repeat?(right) || Input.repeat?(pad_right ? PadConfig.move_right : right)
- cursor_right(Input.trigger?(right) || Input.trigger?(pad_right ? PadConfig.move_right : right))
- end
- pad_left = PadConfig.move_left && PadConfig.move_left != :_left
- if Input.repeat?(left) || Input.repeat?(pad_left ? PadConfig.move_left : left)
- cursor_left(Input.trigger?(left) || Input.trigger?(pad_left ? PadConfig.move_left : left))
- end
- end
- #--------------------------------------------------------------------------
- # * Change Processing for Digits
- #--------------------------------------------------------------------------
- def process_digit_change
- return unless active
- if WolfPad.plugged_in?
- gega_process_digit_change_input(:UP, :DOWN) if GEGAOptions::MenuInput == 0 || GEGAOptions::MenuInput == 2
- gega_process_digit_change_input(:L_UP, :L_DOWN) if GEGAOptions::MenuInput > 0
- else
- gega_process_digit_change_input(:UP, :DOWN)
- end
- end
- def gega_process_digit_change_input(up, down)
- if Input.repeat?(up) || Input.repeat?(down)
- Sound.play_cursor
- place = 10 ** (@digits_max - 1 - @index)
- n = @number / place % 10
- @number -= n * place
- n = (n + 1) % 10 if Input.repeat?(up)
- n = (n + 9) % 10 if Input.repeat?(down)
- @number += n * place
- refresh
- end
- end
- #--------------------------------------------------------------------------
- # * Handling Processing for OK and Cancel
- #--------------------------------------------------------------------------
- def process_handling
- return unless active
- return process_ok if Input.trigger?(PadConfig.confirm)
- return process_cancel if Input.trigger?(PadConfig.cancel)
- end
- end
- class Window_Message
- #--------------------------------------------------------------------------
- # * Update Fast Forward Flag
- #--------------------------------------------------------------------------
- def update_show_fast
- @show_fast = true if Input.trigger?(PadConfig.confirm)
- end
- #--------------------------------------------------------------------------
- # * Input Pause Processing
- #--------------------------------------------------------------------------
- def input_pause
- self.pause = true
- wait(10)
- Fiber.yield until Input.trigger?(PadConfig.cancel) || Input.trigger?(PadConfig.confirm)
- Input.update
- self.pause = false
- end
- end
- class Window_ScrollText
- #--------------------------------------------------------------------------
- # * Determine if Fast Forward
- #--------------------------------------------------------------------------
- def show_fast?
- !$game_message.scroll_no_fast && (Input.press?(PadConfig.dash) || Input.press?(PadConfig.confirm))
- end
- end
- class Scene_Map
- #--------------------------------------------------------------------------
- # * Determine if Menu is Called due to Cancel Button
- #--------------------------------------------------------------------------
- def update_call_menu
- if $game_system.menu_disabled || $game_map.interpreter.running?
- @menu_calling = false
- else
- @menu_calling ||= Input.trigger?(PadConfig.cancel)
- call_menu if @menu_calling && !$game_player.moving?
- end
- end
- end
- class Scene_File
- #--------------------------------------------------------------------------
- # * Update Save File Selection
- #--------------------------------------------------------------------------
- def update_savefile_selection
- return on_savefile_ok if Input.trigger?(PadConfig.confirm)
- return on_savefile_cancel if Input.trigger?(PadConfig.cancel)
- update_cursor
- end
- #--------------------------------------------------------------------------
- # * Update Cursor
- #--------------------------------------------------------------------------
- def update_cursor
- last_index = @index
- if WolfPad.plugged_in?
- gega_update_cursor_input(:UP, :DOWN) if GEGAOptions::MenuInput == 0 || GEGAOptions::MenuInput == 2
- gega_update_cursor_input(:L_UP, :L_DOWN) if GEGAOptions::MenuInput > 0
- else
- gega_update_cursor_input(:UP, :DOWN)
- end
- cursor_pagedown if Input.trigger?(PadConfig.page_down)
- cursor_pageup if Input.trigger?(PadConfig.page_up)
- if @index != last_index
- Sound.play_cursor
- @savefile_windows[last_index].selected = false
- @savefile_windows[@index].selected = true
- end
- end
- end
- def gega_update_cursor_input(up, down)
- cursor_down (Input.trigger?(down)) if Input.repeat?(down)
- cursor_up (Input.trigger?(up)) if Input.repeat?(up)
- end
- class Scene_Gameover
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super
- goto_title if Input.trigger?(PadConfig.confirm)
- end
- end
- class Scene_Target_Select
- def update_targe_select
- if Input.trigger?(PadConfig.cancel)
- cancel_select
- elsif Input.trigger?(Input::DOWN) or Input.trigger?(Input::RIGHT)
- @target_index += 1
- select_target(0)
- Sound.play_cursor
- elsif Input.trigger?(Input::UP) or Input.trigger?(Input::LEFT)
- @target_index -= 1
- select_target(1)
- Sound.play_cursor
- elsif Input.trigger?(PadConfig.confirm)
- Sound.play_ok
- SceneManager.call(Scene_Map)
- end
- end
- end
- end
- #~ class Scene_Quick_Skill_Tool
- #~ def update_skill_selection
- #~ if Input.trigger?(PadConfig.cancel)
- #~ Sound.play_cancel
- #~ SceneManager.call(Scene_Map)
- #~ elsif Input.trigger?(PadConfig.page_down) or Input.trigger?(PadConfig.page_up)
- #~ Sound.play_cursor
- #~ SceneManager.call(Scene_Quick_Item_Tool)
- #~ elsif Input.trigger?(PadConfig.confirm)
- #~ @skill = @skill_window.skill
- #~ return if @skill == nil
- #~ @actor.skill_id = @skill.id
- #~ Sound.play_equip
- #~ end
- #~ end
- #~ end
- #~ class Scene_Quick_Item_Tool < Scene_Base
- #~ def update_item_selection
- #~ if Input.trigger?(PadConfig.cancel)
- #~ Sound.play_cancel
- #~ SceneManager.call(Scene_Map)
- #~ return
- #~ elsif Input.trigger?(PadConfig.page_down) or Input.trigger?(PadConfig.page_up)
- #~ Sound.play_cursor
- #~ SceneManager.call(Scene_Quick_Skill_Tool)
- #~ return
- #~ elsif Input.trigger?(PadConfig.attack2)
- #~ @item = @item_window.item
- #~ return if @item == nil
- #~ if @item.is_a?(RPG::Weapon)
- #~ if @actor.dual_wield?
- #~ @actor.change_equip(1, @item)
- #~ else
- #~ @actor.change_equip(0, @item)
- #~ end
- #~ elsif @item.is_a?(RPG::Armor)
- #~ @actor.change_equip(1, @item)
- #~ elsif @item.is_a?(RPG::Item)
- #~ @actor.item_id = @item.id
- #~ end
- #~ Sound.play_equip
- #~ return
- #~ elsif Input.trigger?(PadConfig.confirm)
- #~ @item = @item_window.item
- #~ return if @item == nil
- #~ case @item
- #~ when RPG::Item
- #~ @actor.item_id = @item.id
- #~ when RPG::Weapon
- #~ @actor.change_equip(0, @item)
- #~ when RPG::Armor
- #~ @actor.change_equip(1, @item)
- #~ end
- #~ Sound.play_equip
- #~ @item_window.refresh
- #~ return
- #~ end
- #~ end
- #~ end
- class M_logo
- def update_skip_logo
- return if !SKIP_BUTTON
- return if @logo_data[1] > @logos.size
- if Input.press?(PadConfig.confirm) or Input.press?(PadConfig.cancel)
- @logo_data[0] = @logo_data[2] + 10 ; @logo_data[1] = @logos.size + 1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement