Class: GTS::SummaryWanted
- Inherits:
-
GamePlay::Summary
- Object
- GamePlay::Base
- GamePlay::BaseCleanUpdate
- GamePlay::BaseCleanUpdate::FrameBalanced
- GamePlay::Summary
- GTS::SummaryWanted
- Defined in:
- scripts/01450 Systems/09000 GTS/09000 GTS.rb
Overview
Show a Pokemon with its requirement in order to trade
Constant Summary
Constants inherited from GamePlay::Summary
GamePlay::Summary::ACTIONS, GamePlay::Summary::KEYS, GamePlay::Summary::LAST_STATE, GamePlay::Summary::TEXT_INDEXES, GamePlay::Summary::TRANSLATED_MOUSE_COORD_DETECTION
Constants inherited from GamePlay::BaseCleanUpdate
GamePlay::BaseCleanUpdate::AIU_KEY2METHOD
Constants inherited from GamePlay::Base
GamePlay::Base::DEFAULT_TRANSITION, GamePlay::Base::DEFAULT_TRANSITION_PARAMETER
Constants included from Input
Input::ALIAS_KEYS, Input::AXIS_MAPPING, Input::AXIS_SENSITIVITY, Input::DEAD_ZONE, Input::Keyboard, Input::Keys, Input::NON_TRIGGER_ZONE, Input::REPEAT_COOLDOWN, Input::REPEAT_SPACE
Constants included from GamePlay::DisplayMessage
GamePlay::DisplayMessage::MESSAGE_ERROR, GamePlay::DisplayMessage::MESSAGE_PROCESS_ERROR
Instance Attribute Summary collapse
-
#return_data
Returns the value of attribute return_data.
Attributes inherited from GamePlay::Summary
Attributes inherited from GamePlay::Base
#__last_scene, #__result_process, #running, #viewport
Attributes included from GamePlay::DisplayMessage
Instance Method Summary collapse
- #create_graphics
-
#create_uis
Create the various UI.
-
#ctrl_id_state
Force the button to disabled unless it's the cancel one.
-
#draw_page_one_gts_wanted(wanted_data)
Draw the wanted info.
-
#initialize(wanted_data) ⇒ SummaryWanted
constructor
A new instance of SummaryWanted.
-
#mouse_quit
Ask if the player wants to decline.
-
#update_inputs
Ask if the player wants to accept this trade.
Methods inherited from GamePlay::Summary
#update_graphics, #update_mouse
Methods inherited from GamePlay::BaseCleanUpdate::FrameBalanced
Methods included from Graphics::FPSBalancer::Marker
Methods inherited from GamePlay::BaseCleanUpdate
#automatic_input_update, #update
Methods inherited from GamePlay::Base
#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=
Methods included from Input
dir4, dir8, get_text, joy_axis_position, press?, register_events, released?, repeat?, swap_states, trigger?
Methods included from GamePlay::DisplayMessage
#can_display_message_be_called?, #close_message_window, #display_message, #display_message_and_wait, #message_class, #message_processing?, #message_visible, #message_visible=
Constructor Details
#initialize(wanted_data) ⇒ SummaryWanted
Returns a new instance of SummaryWanted.
692 693 694 695 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 692 def initialize(wanted_data) super(PFM::Pokemon.new(wanted_data[0], wanted_data[1])) @wanted_data = wanted_data end |
Instance Attribute Details
#return_data
Returns the value of attribute return_data.
691 692 693 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 691 def return_data @return_data end |
Instance Method Details
#create_graphics
724 725 726 727 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 724 def create_graphics super draw_page_one_gts_wanted(@wanted_data) end |
#create_uis
Create the various UI
730 731 732 733 734 735 736 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 730 def create_uis @uis = [ Summary_Memo_GTS.new(@viewport), UI::Summary_Stat.new(@viewport), UI::Summary_Skills.new(@viewport) ] end |
#ctrl_id_state
Force the button to disabled unless it's the cancel one
698 699 700 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 698 def ctrl_id_state return 3 end |
#draw_page_one_gts_wanted(wanted_data)
Draw the wanted info
739 740 741 742 743 744 745 746 747 748 749 750 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 739 def draw_page_one_gts_wanted(wanted_data) @win_text = UI::SpriteStack.new(@viewport) @win_text.push(0, 217, 'team/Win_Txt') @win_text.add_text(2, 220, 238, 15, ext_text(8997, 43), color: 9) data = { id: wanted_data[0], name: data_creature(wanted_data[0]).name, from: wanted_data[1], to: wanted_data[2], sexe: GTS.genders[wanted_data[3]] } @uis[0].text_info.text = format(ext_text(8997, 44), data) end |
#mouse_quit
Ask if the player wants to decline
716 717 718 719 720 721 722 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 716 def mouse_quit $game_system.se_play($data_system.cancel_se) if (ext_text(8997, 42), 1, ext_text(8997, 33), ext_text(8997, 34)) == 0 @return_data = false @running = false end end |
#update_inputs
Ask if the player wants to accept this trade
703 704 705 706 707 708 709 710 711 712 713 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 703 def update_inputs if Input.trigger?(:A) $game_system.se_play($data_system.decision_se) if (ext_text(8997, 41), 1, ext_text(8997, 33), ext_text(8997, 34)) == 0 @return_data = true @running = false end elsif Input.trigger?(:B) mouse_quit end end |