Class: GamePlay::KeyBinding

Inherits:
BaseCleanUpdate::FrameBalanced show all
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

[: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, #running, #viewport

Attributes included from DisplayMessage

#message_window

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseCleanUpdate::FrameBalanced

#update

Methods included from Graphics::FPSBalancer::Marker

#frame_balanced?

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

dir4, dir8, get_text, joy_axis_position, 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

#initializeKeyBinding

Create a new KeyBinding UI



361
362
# File 'docs/4_Systems_105_Options.rb', line 361

def initialize
end

Class Method Details

.input_filename

Return the filename with path of the inputs.yml file



449
450
# File 'docs/4_Systems_105_Options.rb', line 449

def input_filename
end

.is_axis_valid?(data, axis_attr) ⇒ Boolean

Test if the axis from JSON data is valid

Returns:

  • (Boolean)


440
441
# File 'docs/4_Systems_105_Options.rb', line 440

def is_axis_valid?(data, axis_attr)
end

.load_inputs

Load the Inputs



434
435
# File 'docs/4_Systems_105_Options.rb', line 434

def load_inputs
end

.load_inputs_internal

Perform the internal operation of loading the inputs



437
438
# File 'docs/4_Systems_105_Options.rb', line 437

def load_inputs_internal
end

.normalize_inputs

Normalize the Input::Keys contents in order to have a correct display in the UI



443
444
# File 'docs/4_Systems_105_Options.rb', line 443

def normalize_inputs
end

.save_inputs

Save the inputs in the right file



446
447
# File 'docs/4_Systems_105_Options.rb', line 446

def save_inputs
end

Instance Method Details

#create_graphics

Create the grahics of the KeyBinding scene



364
365
# File 'docs/4_Systems_105_Options.rb', line 364

def create_graphics
end

#update_graphics

Update the graphics



367
368
# File 'docs/4_Systems_105_Options.rb', line 367

def update_graphics
end

#update_inputs

Update the inputs



370
371
# File 'docs/4_Systems_105_Options.rb', line 370

def update_inputs
end

#update_mouse(_moved)

Update the mouse

Parameters:

  • _moved (Boolean)

    if the mouse moved



374
375
# File 'docs/4_Systems_105_Options.rb', line 374

def update_mouse(_moved)
end