Class: GamePlay::Menu

Inherits:
BaseCleanUpdate show all
Includes:
MenuMixin
Defined in:
docs/4_Systems_100_Menu.rb

Overview

Main menu UI

Constant Summary collapse

ACTION_LIST =

List of action according to call based on button index

[]
CONDITION_LIST =

List of condition to verify in order to show/activate a button

[]
BUTTON_OVERWRITES =

List of button overwrites

[]
ENTERING_ANIMATION_OFFSET =

Entering - leaving animation offset

150
ENTERING_ANIMATION_DURATION =

Entering - leaving animation duration

15

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 included from MenuMixin

#call_skill_process

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 included from MenuMixin

#execute_skill_process

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

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

#initializeMenu

Create a new menu



25
26
# File 'docs/4_Systems_100_Menu.rb', line 25

def initialize
end

Class Method Details

.clear_previous_registers

Clear all the thing that was previously registered so you can do it your way



120
121
# File 'docs/4_Systems_100_Menu.rb', line 120

def clear_previous_registers
end

.register_button(action, &condition)

Register a button in the UI

Parameters:

  • action (Symbol)

    method to call when the button is clicked

  • condition (Proc)

    block called to verify the condition



112
113
# File 'docs/4_Systems_100_Menu.rb', line 112

def register_button(action, &condition)
end

.register_button_overwrite(index, &block)

Register a button overwrite

Parameters:

  • index (Integer)

    index of the button

  • block (Proc, nil)

    proc called to get the overwrite button class to use



117
118
# File 'docs/4_Systems_100_Menu.rb', line 117

def register_button_overwrite(index, &block)
end

Instance Method Details

#create_graphics

Create all the graphics



28
29
# File 'docs/4_Systems_100_Menu.rb', line 28

def create_graphics
end

#fade_in



51
52
# File 'docs/4_Systems_100_Menu.rb', line 51

def fade_in(*)
end

#fade_out



49
50
# File 'docs/4_Systems_100_Menu.rb', line 49

def fade_out(*)
end

#main_end

End of the scene



31
32
# File 'docs/4_Systems_100_Menu.rb', line 31

def main_end
end

#update_graphics

Update the graphics



43
44
# File 'docs/4_Systems_100_Menu.rb', line 43

def update_graphics
end

#update_inputsBoolean

Update the input interaction

Returns:

  • (Boolean)

    if no input was detected



35
36
# File 'docs/4_Systems_100_Menu.rb', line 35

def update_inputs
end

#update_mouse(moved) ⇒ Boolean

Update the mouse interaction

Parameters:

  • moved (Boolean)

    if the mouse moved

Returns:

  • (Boolean)


40
41
# File 'docs/4_Systems_100_Menu.rb', line 40

def update_mouse(moved)
end

#visible=(value)

Overload the visible= to allow save to keep the curren background

Parameters:

  • value (Boolean)


47
48
# File 'docs/4_Systems_100_Menu.rb', line 47

def visible=(value)
end