Skip to content

Commit

Permalink
spinner on wearable item
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm committed Jan 30, 2024
1 parent f9ad669 commit a1f7a7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions godot/src/ui/components/wearable_item/wearable_item.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var was_pressed = false
@onready var texture_rect_category = %TextureRect_Category
@onready var texture_rect_background = %TextureRect_Background
@onready var texture_rect_preview = %TextureRect_Preview
@onready var texture_progress_bar_loading = %TextureProgressBar_Loading


func _ready():
Expand Down Expand Up @@ -71,6 +72,8 @@ func async_set_wearable(wearable: Dictionary):
texture_rect_preview.texture = res.texture
texture_rect_preview.size = current_size

texture_progress_bar_loading.hide()


func effect_toggle():
if button_pressed:
Expand Down
18 changes: 16 additions & 2 deletions godot/src/ui/components/wearable_item/wearable_item.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

[ext_resource type="Script" path="res://src/ui/components/wearable_item/wearable_item.gd" id="1_vccc4"]
[ext_resource type="Texture2D" uid="uid://c0qx68m7rge52" path="res://assets/ui/MythicThumbnail.png" id="2_bnu38"]
[ext_resource type="Texture2D" uid="uid://dpippmiepkyeb" path="res://decentraland_logo.png" id="2_vuwk7"]
[ext_resource type="Texture2D" uid="uid://bheg7fuh5a4p0" path="res://assets/ui/checked.svg" id="4_cqflp"]
[ext_resource type="Texture2D" uid="uid://vnikogxsqjwe" path="res://assets/ui/Subtract.svg" id="5_dtfap"]
[ext_resource type="Texture2D" uid="uid://dw4mn6l1jn25f" path="res://assets/ui/Intersect.svg" id="6_ckipv"]
[ext_resource type="PackedScene" uid="uid://buu3ox7iefpgx" path="res://src/ui/components/loading_spinner/loading_spinner.tscn" id="7_74eud"]
[ext_resource type="Texture2D" uid="uid://bygnpeber2qmc" path="res://assets/ui/wearable_categories/mask-icon.svg" id="7_h4p8s"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_24axm"]
Expand Down Expand Up @@ -87,7 +87,6 @@ stretch_mode = 5
[node name="TextureRect_Preview" type="TextureRect" parent="MarginContainer/PanelContainer_White"]
unique_name_in_owner = true
layout_mode = 2
texture = ExtResource("2_vuwk7")
expand_mode = 3
stretch_mode = 5

Expand Down Expand Up @@ -146,4 +145,19 @@ texture = ExtResource("7_h4p8s")
expand_mode = 1
stretch_mode = 4

[node name="TextureProgressBar_Loading" parent="." instance=ExtResource("7_74eud")]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -64.0
offset_top = -64.0
offset_right = 64.0
offset_bottom = 64.0
grow_horizontal = 2
grow_vertical = 2

[connection signal="toggled" from="." to="." method="_on_toggled"]

0 comments on commit a1f7a7c

Please sign in to comment.