Class: GamePlay::KeyBinding
- Inherits:
-
BaseCleanUpdate::FrameBalanced
- Object
- Base
- BaseCleanUpdate
- BaseCleanUpdate::FrameBalanced
- GamePlay::KeyBinding
- Defined in:
- docs/4_Systems_105_Options.rb
Overview
Class that show the KeyBinding UI and allow to change it
Constant Summary collapse
- KEYS =
List of keys use by the 3 modes
[%i[A RIGHT DOWN B]] * 3
- MOUSE_ACTION_NAV =
List of mouse action in navigation mode
%i[action_a_nav action_a_nav action_down_nav action_b_nav]
- MOUSE_ACTION_SEL =
List of mouse action in selection mode
%i[action_a_sel action_right_sel action_down_sel action_b_sel]
- MOUSE_ACTION_BLK =
List of mouse action in blink mode
%i[action_b_blink action_b_blink action_b_blink action_b_blink]
- KEYS_TO_CHECK =
List of keys to check when trying to overwrite an input
%i[A B X Y UP DOWN RIGHT LEFT]
Constants inherited from BaseCleanUpdate
BaseCleanUpdate::AIU_KEY2METHOD
Constants inherited from Base
Base::DEFAULT_TRANSITION, 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 DisplayMessage
DisplayMessage::MESSAGE_ERROR, DisplayMessage::MESSAGE_PROCESS_ERROR
Instance Attribute Summary
Attributes inherited from Base
#__last_scene, #__result_process, #clock, #running, #viewport
Attributes included from DisplayMessage
Class Method Summary collapse
-
.input_filename
Return the filename with path of the inputs.yml file.
-
.is_axis_valid?(data, axis_attr) ⇒ Boolean
Test if the axis from JSON data is valid.
-
.load_inputs
Load the Inputs.
-
.load_inputs_internal
Perform the internal operation of loading the inputs.
-
.normalize_inputs
Normalize the Input::Keys contents in order to have a correct display in the UI.
-
.save_inputs
Save the inputs in the right file.
Instance Method Summary collapse
-
#create_graphics
Create the grahics of the KeyBinding scene.
-
#initialize ⇒ KeyBinding
constructor
Create a new KeyBinding UI.
-
#update_graphics
Update the graphics.
-
#update_inputs
Update the inputs.
-
#update_mouse(_moved)
Update the mouse.
Methods inherited from BaseCleanUpdate::FrameBalanced
Methods included from Graphics::FPSBalancer::Marker
Methods inherited from BaseCleanUpdate
#automatic_input_update, #update
Methods inherited from Base
#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=
Methods included from Input
clear, close_virtual_keyboard, dir4, dir8, get_text, joy_axis_position, load_touch_screen, open_virtual_keyboard, press?, register_events, released?, repeat?, swap_states, trigger?
Methods included from 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 ⇒ KeyBinding
Create a new KeyBinding UI
372 373 |
# File 'docs/4_Systems_105_Options.rb', line 372 def initialize end |
Class Method Details
.input_filename
Return the filename with path of the inputs.yml file
460 461 |
# File 'docs/4_Systems_105_Options.rb', line 460 def input_filename end |
.is_axis_valid?(data, axis_attr) ⇒ Boolean
Test if the axis from JSON data is valid
451 452 |
# File 'docs/4_Systems_105_Options.rb', line 451 def is_axis_valid?(data, axis_attr) end |
.load_inputs
Load the Inputs
445 446 |
# File 'docs/4_Systems_105_Options.rb', line 445 def load_inputs end |
.load_inputs_internal
Perform the internal operation of loading the inputs
448 449 |
# File 'docs/4_Systems_105_Options.rb', line 448 def load_inputs_internal end |
.normalize_inputs
Normalize the Input::Keys contents in order to have a correct display in the UI
454 455 |
# File 'docs/4_Systems_105_Options.rb', line 454 def normalize_inputs end |
.save_inputs
Save the inputs in the right file
457 458 |
# File 'docs/4_Systems_105_Options.rb', line 457 def save_inputs end |
Instance Method Details
#create_graphics
Create the grahics of the KeyBinding scene
375 376 |
# File 'docs/4_Systems_105_Options.rb', line 375 def create_graphics end |
#update_graphics
Update the graphics
378 379 |
# File 'docs/4_Systems_105_Options.rb', line 378 def update_graphics end |
#update_inputs
Update the inputs
381 382 |
# File 'docs/4_Systems_105_Options.rb', line 381 def update_inputs end |
#update_mouse(_moved)
Update the mouse
385 386 |
# File 'docs/4_Systems_105_Options.rb', line 385 def update_mouse(_moved) end |