2022-07-25 09:11:42 +01:00
|
|
|
tool
|
|
|
|
extends Control
|
|
|
|
|
2022-07-25 20:39:38 +01:00
|
|
|
export var bold : bool setget set_bold
|
|
|
|
|
2022-07-25 20:23:33 +01:00
|
|
|
|
2022-07-25 09:11:42 +01:00
|
|
|
func _process(_delta):
|
|
|
|
|
|
|
|
# update the pivot offset to make sure the object's animations
|
|
|
|
# are always centered
|
|
|
|
$Sprite.rect_pivot_offset = rect_size/2
|
|
|
|
$Particles2D.position = rect_size/2
|
2022-07-25 20:23:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
func set_extra_info(text : String):
|
|
|
|
$"%ExtraInfo".text = text
|
2022-07-25 20:39:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
func set_bold(is_bold : bool = true):
|
|
|
|
if is_bold:
|
|
|
|
$Sprite.texture = load("res://Assets/DiceInputBold.png")
|
|
|
|
else:
|
|
|
|
$Sprite.texture = load("res://Assets/DiceInput.png")
|
|
|
|
|
|
|
|
bold = is_bold
|