Class: UI::Bag::ButtonList::ItemButton

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

Overview

Button showing the item name

Constant Summary collapse

BACKGROUND =

Name of the button background

'bag/button_list'

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

Constructor Details

#initialize(viewport, index) ⇒ ItemButton

Create a new Item button

Parameters:



346
347
# File 'docs/4_Systems_103_Bag.rb', line 346

def initialize(viewport, index)
end

Instance Attribute Details

#indexInteger

Returns Index of the button in the list.

Returns:

  • (Integer)

    Index of the button in the list



342
343
344
# File 'docs/4_Systems_103_Bag.rb', line 342

def index
  @index
end

Instance Method Details

#active?Boolean

Is the button active

Returns:

  • (Boolean)


349
350
# File 'docs/4_Systems_103_Bag.rb', line 349

def active?
end

#reset

Reset the button coordinate



356
357
# File 'docs/4_Systems_103_Bag.rb', line 356

def reset
end

#text=(text)

Set the button text

Parameters:

  • text (String, nil)

    the item name



353
354
# File 'docs/4_Systems_103_Bag.rb', line 353

def text=(text)
end