Class: UI::Bag::WinPocket

Inherits:
SpriteStack show all
Defined in:
scripts/01300 UI/00300 Bag/00020 WinPocket.rb

Overview

UI element showing the name of the Pocket in the bag

Constant Summary collapse

BACKGROUND =

Name of the background file

'bag/win_pocket'
COORDINATES =

Coordinate of the spritestack

15, 4

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary

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) ⇒ WinPocket

Create a new WinPocket

Parameters:



11
12
13
14
# File 'scripts/01300 UI/00300 Bag/00020 WinPocket.rb', line 11

def initialize(viewport)
  super(viewport, *COORDINATES)
  init_sprite
end

Instance Method Details

#text=(text)

Set the text to show

Parameters:

  • text (String)

    the text to show



18
19
20
# File 'scripts/01300 UI/00300 Bag/00020 WinPocket.rb', line 18

def text=(text)
  @text.text = text
end