Class: Scene_Item
- Inherits:
-
Scene_ItemBase
- Object
- Scene_Base
- Scene_MenuBase
- Scene_ItemBase
- Scene_Item
- Defined in:
- lib/rgss3_default_scripts/Scene_Item.rb
Overview
** Scene_Item
This class performs the item screen processing.
Instance Method Summary collapse
-
#create_category_window ⇒ Object
————————————————————————– * Create Category Window ————————————————————————–.
-
#create_item_window ⇒ Object
————————————————————————– * Create Item Window ————————————————————————–.
-
#on_category_ok ⇒ Object
————————————————————————– * Category [OK] ————————————————————————–.
-
#on_item_cancel ⇒ Object
————————————————————————– * Item [Cancel] ————————————————————————–.
-
#on_item_ok ⇒ Object
————————————————————————– * Item [OK] ————————————————————————–.
-
#play_se_for_item ⇒ Object
————————————————————————– * Play SE When Using Item ————————————————————————–.
-
#start ⇒ Object
————————————————————————– * Start Processing ————————————————————————–.
-
#use_item ⇒ Object
————————————————————————– * Use Item ————————————————————————–.
Methods inherited from Scene_ItemBase
#activate_item_window, #check_common_event, #create_actor_window, #cursor_left?, #determine_item, #hide_sub_window, #item, #item_effects_valid?, #item_target_actors, #item_usable?, #on_actor_cancel, #on_actor_ok, #show_sub_window, #use_item_to_actors, #user
Methods inherited from Scene_MenuBase
#create_background, #create_help_window, #dispose_background, #next_actor, #on_actor_change, #prev_actor, #terminate
Methods inherited from Scene_Base
#check_gameover, #create_main_viewport, #dispose_all_windows, #dispose_main_viewport, #fadeout_all, #main, #perform_transition, #post_start, #pre_terminate, #return_scene, #scene_changing?, #terminate, #transition_speed, #update, #update_all_windows, #update_basic
Instance Method Details
#create_category_window ⇒ Object
-
Create Category Window
20 21 22 23 24 25 26 27 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 20 def create_category_window @category_window = Window_ItemCategory.new @category_window. = @viewport @category_window.help_window = @help_window @category_window.y = @help_window.height @category_window.set_handler(:ok, method(:on_category_ok)) @category_window.set_handler(:cancel, method(:return_scene)) end |
#create_item_window ⇒ Object
-
Create Item Window
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 31 def create_item_window wy = @category_window.y + @category_window.height wh = Graphics.height - wy @item_window = Window_ItemList.new(0, wy, Graphics.width, wh) @item_window. = @viewport @item_window.help_window = @help_window @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @category_window.item_window = @item_window end |
#on_category_ok ⇒ Object
-
Category [OK]
44 45 46 47 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 44 def on_category_ok @item_window.activate @item_window.select_last end |
#on_item_cancel ⇒ Object
-
Item [Cancel]
58 59 60 61 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 58 def on_item_cancel @item_window.unselect @category_window.activate end |
#on_item_ok ⇒ Object
-
Item [OK]
51 52 53 54 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 51 def on_item_ok $game_party.last_item.object = item determine_item end |
#play_se_for_item ⇒ Object
-
Play SE When Using Item
65 66 67 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 65 def play_se_for_item Sound.play_use_item end |
#start ⇒ Object
-
Start Processing
11 12 13 14 15 16 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 11 def start super create_help_window create_category_window create_item_window end |
#use_item ⇒ Object
-
Use Item
71 72 73 74 |
# File 'lib/rgss3_default_scripts/Scene_Item.rb', line 71 def use_item super @item_window.redraw_current_item end |