Class: UI::PSDKMenuButtonBase

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_100_Menu.rb

Overview

Button that is shown in the main menu

Direct Known Subclasses

GirlBagMenuButton

Constant Summary collapse

BASIC_COORDINATE =

Basic coordinate of the button on screen

[192, 16]
OFFSET_COORDINATE =

Offset between each button

[0, 24]
SELECT_POSITION_OFFSET =

Offset between selected position and unselected position

[-6, 0]
ANGLE_VARIATION =

Angle variation of the icon in one direction

15

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from SpriteStack

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

Instance Method Summary collapse

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_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport, real_index, positional_index) ⇒ PSDKMenuButtonBase

Create a new PSDKMenuButton

Parameters:

  • viewport (Viewport)
  • real_index (Integer)

    real index of the button in the menu

  • positional_index (Integer)

    index used to position the button on screen



152
153
# File 'docs/4_Systems_100_Menu.rb', line 152

def initialize(viewport, real_index, positional_index)
end

Instance Attribute Details

#selectedBoolean

Returns selected.

Returns:

  • (Boolean)

    selected



147
148
149
# File 'docs/4_Systems_100_Menu.rb', line 147

def selected
  @selected
end

Instance Method Details

#update

Update the button animation



155
156
# File 'docs/4_Systems_100_Menu.rb', line 155

def update
end