Class: GTS::SummarySelect

Inherits:
GamePlay::Summary show all
Defined in:
scripts/01450 Systems/09000 GTS/09000 GTS.rb

Overview

Selection of a Pokemon in a List

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

Attributes inherited from GamePlay::Summary

#skill_selected

Attributes inherited from GamePlay::Base

#__last_scene, #__result_process, #running, #viewport

Attributes included from GamePlay::DisplayMessage

#message_window

Instance Method Summary collapse

Methods inherited from GamePlay::Summary

#update_graphics, #update_mouse

Methods inherited from GamePlay::BaseCleanUpdate::FrameBalanced

#update

Methods included from Graphics::FPSBalancer::Marker

#frame_balanced?

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(list) ⇒ SummarySelect

Create a new SummarySelect



660
661
662
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 660

def initialize(list)
  super(list.first, :view, list)
end

Instance Attribute Details

#return_dataInteger, false

Returns Index of the Pokemon the player wants in the list.

Returns:

  • (Integer, false)

    Index of the Pokemon the player wants in the list



658
659
660
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 658

def return_data
  @return_data
end

Instance Method Details

#mouse_quit

Overload the mouse_quit to ask if the player really wants to quit (without choosing)



680
681
682
683
684
685
686
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 680

def mouse_quit
  $game_system.se_play($data_system.cancel_se)
  if display_message(ext_text(8997, 40), 1, ext_text(8997, 33), ext_text(8997, 34)) == 0
    @return_data = false
    @running = false
  end
end

#update_inputs

Overload the update inputs to ask if the player wants the current Pokemon



665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 665

def update_inputs
  if Input.trigger?(:A)
    $game_system.se_play($data_system.decision_se)
    if display_message(ext_text(8997, 39), 1, ext_text(8997, 33), ext_text(8997, 34)) == 0
      @return_data = @party_index
      @running = false
    end
  elsif Input.trigger?(:B)
    mouse_quit
  else
    super
  end
end