Class: UI::Bag::SearchBar

Inherits:
SpriteStack show all
Defined in:
scripts/01450 Systems/00103 Bag/00002 UI/00100 SearchBar.rb

Overview

Class that shows a search bar

Constant Summary collapse

COORDINATES =

Coordinate of the search bar

3, 220

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

Create a new SearchBar

Parameters:



11
12
13
14
15
# File 'scripts/01450 Systems/00103 Bag/00002 UI/00100 SearchBar.rb', line 11

def initialize(viewport)
  super(viewport, *COORDINATES)
  init_sprite
  self.z = 506 # 500 + 6 since ctrl button has more priority
end

Instance Attribute Details

#search_inputUI::UserInput (readonly)

Returns the search input object.

Returns:



8
9
10
# File 'scripts/01450 Systems/00103 Bag/00002 UI/00100 SearchBar.rb', line 8

def search_input
  @search_input
end

Instance Method Details

#update

Update the search bar



18
19
20
# File 'scripts/01450 Systems/00103 Bag/00002 UI/00100 SearchBar.rb', line 18

def update
  @search_input.update
end