Skip to content

Commit

Permalink
fix: new theme for discover, custom places not shows the image of it,…
Browse files Browse the repository at this point in the history
… and show/hide last visited inmediatly, and not after the request is done (#332)

* fix: new theme for discover, and better flow on it

* fixes

* fix exodus town
  • Loading branch information
kuruk-mm authored Feb 28, 2024
1 parent 5ac42b6 commit 32dc9db
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 104 deletions.
6 changes: 6 additions & 0 deletions godot/.godot/global_script_class_cache.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ list=Array[Dictionary]([{
"language": &"GDScript",
"path": "res://src/config/config_data.gd"
}, {
"base": &"CarrouselGenerator",
"class": &"CustomPlacesGenerator",
"icon": "",
"language": &"GDScript",
"path": "res://src/ui/components/discover/places/custom_places_generator.gd"
}, {
"base": &"Button",
"class": &"CustomTouchButton",
"icon": "",
Expand Down
2 changes: 1 addition & 1 deletion godot/src/decentraland_components/avatar/avatar.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ bones/61/rotation = Quaternion(0.000252648, 0.0748679, -0.0078771, 0.997162)
bones/61/scale = Vector3(1, 1, 1)

[node name="BoneAttachment3D_Name" type="BoneAttachment3D" parent="Armature/Skeleton3D"]
transform = Transform3D(1, 9.66535e-06, -7.30157e-07, 8.64267e-07, -0.013608, 0.999907, 9.65747e-06, -0.999907, -0.0136078, -0.40619, -4.20348, -172.423)
transform = Transform3D(1, 9.65155e-06, -9.08971e-07, 1.01328e-06, -0.0136072, 0.999907, 9.64315e-06, -0.999907, -0.0136072, -0.406191, -4.20342, -172.423)
bone_name = "Avatar_Head"
bone_idx = 61

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ extends Control


func _ready():
hide()
if is_instance_valid(generator):
generator.set_consumer_visible.connect(self.set_visible)
generator.item_container = item_container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ theme_override_constants/margin_bottom = 0
[node name="Label_Title" type="Label" parent="MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(0.988235, 0.988235, 0.988235, 1)
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("1_qm5fw")
theme_override_font_sizes/font_size = 18
text = "Section Tittle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
[ext_resource type="FontFile" uid="uid://di6yadh02vrla" path="res://assets/themes/fonts/inter/Inter-Regular.ttf" id="9_havap"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mv7ex"]
bg_color = Color(0.6, 0.6, 0.6, 0)
bg_color = Color(1, 1, 1, 0.635294)
corner_radius_top_left = 12
corner_radius_top_right = 12
corner_radius_bottom_right = 12
corner_radius_bottom_left = 12
shadow_size = 4
shadow_offset = Vector2(2, 2)
shadow_color = Color(1, 1, 1, 0.176471)
shadow_size = 8

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c0877"]
bg_color = Color(0.988235, 0.988235, 0.988235, 1)
Expand All @@ -32,12 +32,12 @@ corner_radius_bottom_right = 12
corner_radius_bottom_left = 12

[sub_resource type="Gradient" id="Gradient_e8nv0"]
colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 0)
colors = PackedColorArray(0, 0, 0, 0.686275, 0, 0, 0, 0)

[sub_resource type="GradientTexture2D" id="GradientTexture2D_e6dy7"]
gradient = SubResource("Gradient_e8nv0")
fill_from = Vector2(1, 1)
fill_to = Vector2(1, 0.632479)
fill_to = Vector2(1, 0.82906)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_368si"]
bg_color = Color(0.0392157, 0.0392157, 0.0392157, 1)
Expand Down Expand Up @@ -65,7 +65,7 @@ colors = PackedColorArray(0.914015, 0.145083, 0.329259, 1, 0.917647, 0.145098, 0
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_b6og1"]

[node name="DiscoverCarrouselItem" type="TextureButton"]
custom_minimum_size = Vector2(235, 175)
custom_minimum_size = Vector2(235, 226)
offset_right = 225.0
offset_bottom = 175.0
mouse_filter = 1
Expand All @@ -74,13 +74,14 @@ script = ExtResource("1_foqq3")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
offset_right = 235.0
offset_bottom = 185.0
offset_bottom = 226.0
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5

[node name="PanelShadow" type="Panel" parent="MarginContainer"]
visible = false
custom_minimum_size = Vector2(225, 175)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_mv7ex")
Expand Down Expand Up @@ -180,7 +181,7 @@ size_flags_vertical = 3
alignment = 2

[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/Panel/DiscoverCarrouselItem/Control/MarginContainer/VBoxContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 40)
custom_minimum_size = Vector2(0, 30)
layout_mode = 2
theme_override_constants/separation = 11
alignment = 2
Expand Down Expand Up @@ -257,7 +258,7 @@ text = "78%"
horizontal_alignment = 2

[node name="Panel" type="Control" parent="MarginContainer/Panel/DiscoverCarrouselItem"]
custom_minimum_size = Vector2(0, 28)
custom_minimum_size = Vector2(0, 50)
layout_mode = 2
size_flags_vertical = 0
mouse_filter = 1
Expand All @@ -279,23 +280,38 @@ layout_mode = 2

[node name="Label_Title" type="Label" parent="MarginContainer/Panel/DiscoverCarrouselItem/Panel/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 20)
layout_mode = 2
size_flags_vertical = 3
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("6_ak6x4")
text = "Scene Title"
autowrap_mode = 2
vertical_alignment = 1
clip_text = true

[node name="Label_Description" type="Label" parent="MarginContainer/Panel/DiscoverCarrouselItem/Panel/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(0, 20)
layout_mode = 2
size_flags_vertical = 3
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("9_havap")
text = "Scene Description"
autowrap_mode = 2
clip_text = true

[node name="MouseHover" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Panel" type="Panel" parent="MouseHover"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[connection signal="pressed" from="." to="." method="_on_pressed"]
83 changes: 56 additions & 27 deletions godot/src/ui/components/discover/discover.tscn
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[gd_scene load_steps=15 format=3 uid="uid://bp6yn0qw2s6ua"]
[gd_scene load_steps=17 format=3 uid="uid://bp6yn0qw2s6ua"]

[ext_resource type="Theme" uid="uid://bm1rvmngc833v" path="res://assets/themes/theme.tres" id="1_tkk7t"]
[ext_resource type="Script" path="res://src/ui/components/discover/discover.gd" id="2_f08es"]
[ext_resource type="FontFile" uid="uid://hqi2efd5kd17" path="res://assets/themes/fonts/inter/Inter-Bold.ttf" id="3_17slp"]
[ext_resource type="PackedScene" uid="uid://3de823q04ptd" path="res://src/ui/components/discover/carrousel/discover_carrousel.tscn" id="3_s5vyg"]
[ext_resource type="Texture2D" uid="uid://b5p8bwrk06ov8" path="res://assets/ui/discover/discover_banner.png" id="4_2pq8h"]
[ext_resource type="PackedScene" uid="uid://ci4mkq5dpxbys" path="res://src/ui/components/discover/places/places_generator.tscn" id="4_q55yj"]
[ext_resource type="Texture2D" uid="uid://b4bstp7qn7avb" path="res://assets/ui/discover/world_banner.png" id="5_1hjun"]
[ext_resource type="PackedScene" uid="uid://kfsjxah2khkg" path="res://src/ui/components/discover/places/custom_places_generator.tscn" id="7_ehm1e"]
[ext_resource type="PackedScene" uid="uid://vc72j0sq70jq" path="res://src/ui/components/discover/jump_in/jump_in.tscn" id="9_gh6mh"]

[sub_resource type="Gradient" id="Gradient_gj5s1"]
offsets = PackedFloat32Array(0.373134, 1)
colors = PackedColorArray(0.862745, 0.176471, 0.827451, 1, 0.286275, 0.0980392, 0.458824, 1)
[sub_resource type="Gradient" id="Gradient_m47k4"]
colors = PackedColorArray(0.796078, 0.811765, 0.835294, 1, 0.796078, 0.811765, 0.835294, 1)

[sub_resource type="GradientTexture2D" id="GradientTexture2D_05s6u"]
gradient = SubResource("Gradient_gj5s1")
fill = 1
fill_from = Vector2(0.5, 0.5)
metadata/_snap_enabled = true
[sub_resource type="GradientTexture2D" id="GradientTexture2D_6lhmr"]
gradient = SubResource("Gradient_m47k4")

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_746xu"]
bg_color = Color(0, 0, 0, 0.2)

[sub_resource type="Animation" id="Animation_okrup"]
length = 0.001
Expand Down Expand Up @@ -76,7 +76,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("GradientTexture2D_05s6u")
texture = SubResource("GradientTexture2D_6lhmr")

[node name="ScrollContainer" type="ScrollContainer" parent="TextureRect"]
layout_mode = 1
Expand All @@ -92,7 +92,28 @@ vertical_scroll_mode = 3
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/separation = 20
theme_override_constants/separation = 0

[node name="PanelContainer_Navbar" type="PanelContainer" parent="TextureRect/ScrollContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_746xu")

[node name="MarginContainer" type="MarginContainer" parent="TextureRect/ScrollContainer/VBoxContainer/PanelContainer_Navbar"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 8
theme_override_constants/margin_bottom = 8

[node name="HBoxContainer" type="HBoxContainer" parent="TextureRect/ScrollContainer/VBoxContainer/PanelContainer_Navbar/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 14

[node name="Label" type="Label" parent="TextureRect/ScrollContainer/VBoxContainer/PanelContainer_Navbar/MarginContainer/HBoxContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("3_17slp")
theme_override_font_sizes/font_size = 28
text = "Discover"

[node name="MarginContainer" type="MarginContainer" parent="TextureRect/ScrollContainer/VBoxContainer"]
layout_mode = 2
Expand All @@ -111,7 +132,7 @@ layout_mode = 2
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_right = 1214.0
offset_right = 2434.0
grow_horizontal = 2

[node name="TextureRect_GenesisCity" type="TextureRect" parent="TextureRect/ScrollContainer/VBoxContainer/MarginContainer/Control/Content"]
Expand Down Expand Up @@ -145,59 +166,67 @@ libraries = {
}
autoplay = "default"

[node name="LastVisited" parent="TextureRect/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
[node name="VBoxContainer" type="VBoxContainer" parent="TextureRect/ScrollContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 20

[node name="LastVisited" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
unique_name_in_owner = true
layout_mode = 2
generator = NodePath("LastVisitGenerator")
title = "Last Visited"

[node name="LastVisitGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/LastVisited" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
[node name="LastVisitGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer/LastVisited" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
unique_name_in_owner = true
last_places_logic = true
discover = NodePath("../../../../..")
discover = NodePath("../../../../../..")

[node name="PlacesFavorites" parent="TextureRect/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
[node name="PlacesFavorites" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
visible = false
layout_mode = 2
generator = NodePath("PlacesGenerator")
title = "Favorites"

[node name="PlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/PlacesFavorites" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
[node name="PlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer/PlacesFavorites" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
order_by = 1
only_favorites = true
discover = NodePath("../../../../..")
discover = NodePath("../../../../../..")

[node name="PlacesFeatured" parent="TextureRect/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
[node name="PlacesFeatured" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
layout_mode = 2
generator = NodePath("CustomPlacesGenerator")
title = "Featured"

[node name="CustomPlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/PlacesFeatured" node_paths=PackedStringArray("discover") instance=ExtResource("7_ehm1e")]
discover = NodePath("../../../../..")
[node name="CustomPlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer/PlacesFeatured" node_paths=PackedStringArray("discover") instance=ExtResource("7_ehm1e")]
discover = NodePath("../../../../../..")

[node name="PlacesMostActive" parent="TextureRect/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
[node name="PlacesMostActive" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
layout_mode = 2
generator = NodePath("PlacesGenerator")
title = "Most Actives"

[node name="PlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/PlacesMostActive" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
[node name="PlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer/PlacesMostActive" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
order_by = 1
discover = NodePath("../../../../..")
discover = NodePath("../../../../../..")

[node name="PlacesWorlds" parent="TextureRect/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
[node name="PlacesWorlds" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer" node_paths=PackedStringArray("generator") instance=ExtResource("3_s5vyg")]
layout_mode = 2
generator = NodePath("PlacesGenerator")
title = "Worlds"

[node name="PlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/PlacesWorlds" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
[node name="PlacesGenerator" parent="TextureRect/ScrollContainer/VBoxContainer/VBoxContainer/PlacesWorlds" node_paths=PackedStringArray("discover") instance=ExtResource("4_q55yj")]
order_by = 2
only_worlds = true
discover = NodePath("../../../../..")
discover = NodePath("../../../../../..")

[node name="HSeparator" type="HSeparator" parent="TextureRect/ScrollContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 128
theme_override_styles/separator = SubResource("StyleBoxEmpty_w46h5")

[node name="PanelContainer" type="PanelContainer" parent="TextureRect/ScrollContainer/VBoxContainer"]
layout_mode = 2

[node name="CanvasLayer" type="CanvasLayer" parent="."]

[node name="JumpIn" parent="CanvasLayer" instance=ExtResource("9_gh6mh")]
Expand Down
Loading

0 comments on commit 32dc9db

Please sign in to comment.