22 lines
384 B
GDScript
22 lines
384 B
GDScript
extends NinePatchRect
|
|
var item_index_in_all:int=0
|
|
signal click
|
|
func set_data(item_data:Dictionary):
|
|
%face.texture=Database.get_texture(item_data["texture"])
|
|
if item_data.has("num") and item_data["num"]>1:
|
|
%num.show()
|
|
%num.text=str(item_data["num"])
|
|
|
|
else:
|
|
%num.hide()
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
func _on_tool_button_pressed() -> void:
|
|
click.emit()
|
|
pass # Replace with function body.
|