Class: UI::GenericBaseMultiMode

Inherits:
GenericBase show all
Defined in:
docs/01450_Systems_00000_General_00100_UI_Generics.rb

Overview

Generic base allowing multiple button mode by initilizing it with all the value for keys & texts

Constant Summary

Constants inherited from GenericBase

UI::GenericBase::BUTTON_TO_HIDE, UI::GenericBase::DEFAULT_KEYS

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from GenericBase

#background, #button_texts, #ctrl, #keys

Attributes inherited from SpriteStack

#animated, #data, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

Methods inherited from GenericBase

#hide_win_text, #show_win_text, #update_background_animation, #win_text_visible?

Methods inherited from SpriteStack

#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport, texts, keys, mode = 0) ⇒ GenericBaseMultiMode

Create a new GenericBase UI

Parameters:

  • viewport (Viewport)
  • texts (Array<Array<String>>)

    list of texts shown in the ControlButton

  • keys (Array<Array<Symbol>>)

    list of keys used in the ControlButton



484
485
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 484

def initialize(viewport, texts, keys, mode = 0)
end

Instance Attribute Details

#modeInteger

Returns current mode of the UI.

Returns:

  • (Integer)

    current mode of the UI



479
480
481
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 479

def mode
  @mode
end