Skip to content
Divided by Zer0 edited this page Nov 24, 2020 · 9 revisions

Token

Extends: HBoxContainer

Description

The token class is controlling the creation of new tokens as well as the control of their counter

Property Descriptions

count

export var count: int = 1
  • Setter: set_count
  • Getter: get_count

count_label

var count_label

Method Descriptions

setup

func setup(token_name: String) -> void

Initializes the token with the right texture and name based on the values in the configuration

set_count

func set_count(value: int = 1) -> void

Sets the token counter to the specified value

get_count

func get_count() -> int

Returns the amount of tokens of this type

expand

func expand() -> void

Reveals the Name label.

Used when the token drawer is expanded

retract

func retract() -> void

Hides the Name label.

Used when the token drawer is withdrawn

Clone this wiki locally