ESCInputsManager.HoverStack
Extends: RefCounted
Description
Hover Stack implementation.
Members
hover_stack
var hover_stack: Array
Array representing the hover stack
Signals
hover_stack_changed
signal hover_stack_changed()
Emitted when the content of the hover stack has changed
Parameters
None.
hover_stack_emptied
signal hover_stack_emptied()
Emitted when the hover stack was emptied
Parameters
None.
Methods
add_item
func add_item(item: Variant) -> void
Add the given item to the stack if not already in it.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item |
|
the item to add to the hover stack |
yes |
Returns
Returns nothing.
add_items
func add_items(items: Array) -> void
Add the items contained in given list to the stack if not already in it.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
items |
|
the items list (array) to add to the hover stack |
yes |
Returns
Returns nothing.
clean
func clean() -> void
Clean the hover stack
Parameters
None.
Returns
Returns nothing.
pop_top_item
func pop_top_item() -> Variant
Pops the top element of the hover stack and returns it
Parameters
None.
Returns
Returns nothing.
get_top_item
func get_top_item() -> Variant
The top element of the hover stack
Parameters
None.
Returns
Returns the top element of the hover stack. (Variant)
erase_item
func erase_item(item: Variant) -> void
Remove the given item from the stack
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item |
|
the item to remove from the hover stack |
yes |
Returns
Returns nothing.
clear
func clear() -> void
Clear the stack of hovered items
Parameters
None.
Returns
Returns nothing.
is_empty
func is_empty() -> bool
True if the hover stack is empty, else false
Parameters
None.
Returns
Returns true if the hover stack is empty, else false. (bool)
has
func has(item: Variant) -> bool
True if the hover stack contains the given item
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item |
|
the item to search |
yes |
Returns
Returns true if the hover stack contains the given item. (bool)
get_all
func get_all() -> Array
The hover stack array
Parameters
None.
Returns
Returns the hover stack array. (Array)