Class: UI::Storage::RapidSearch

Inherits:
UI::SpriteStack show all
Defined in:
scripts/01450 Systems/00200 Storage/00002 UI_Storage/00006 RapidSearch.rb

Overview

Class responsive of showing a rapid search

Constant Summary

Constants inherited from UI::SpriteStack

UI::SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary

Attributes inherited from UI::SpriteStack

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

Instance Method Summary collapse

Methods inherited from UI::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) ⇒ RapidSearch

Create a new rapid search

Parameters:



7
8
9
10
# File 'scripts/01450 Systems/00200 Storage/00002 UI_Storage/00006 RapidSearch.rb', line 7

def initialize(viewport)
  super
  create_stack
end

Instance Method Details

#reset

Reset the search



26
27
28
# File 'scripts/01450 Systems/00200 Storage/00002 UI_Storage/00006 RapidSearch.rb', line 26

def reset
  @user_input.text = ''
end

#textString

Get the text of the user input

Returns:



21
22
23
# File 'scripts/01450 Systems/00200 Storage/00002 UI_Storage/00006 RapidSearch.rb', line 21

def text
  @user_input.text
end

#update

Update the user input



13
14
15
16
17
# File 'scripts/01450 Systems/00200 Storage/00002 UI_Storage/00006 RapidSearch.rb', line 13

def update
  return unless visible

  @user_input.update
end