Skip to content

Commit 72b9422

Browse files
committed
Added icon for "Browse Community Nodes" button
1 parent 15ed529 commit 72b9422

4 files changed

Lines changed: 45 additions & 2 deletions

File tree

material_maker/panels/library/library.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func _notification(what: int) -> void:
5959
if what == NOTIFICATION_THEME_CHANGED:
6060
if not is_node_ready():
6161
await ready
62+
%Download.texture = get_theme_icon("download", "MM_Icons")
6263
for s in library_manager.get_sections():
6364
var button : Button = category_buttons[s]
6465
button.icon = get_theme_icon("section_" + s.to_lower(), "MM_Icons")

material_maker/panels/library/library.tscn

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
[gd_scene load_steps=5 format=3 uid="uid://drbpisn5f3h8y"]
1+
[gd_scene load_steps=7 format=3 uid="uid://drbpisn5f3h8y"]
22

33
[ext_resource type="Script" uid="uid://byotadn432paf" path="res://material_maker/panels/library/library_tree.gd" id="1"]
44
[ext_resource type="Script" uid="uid://cg0s65b0doku6" path="res://material_maker/panels/library/library.gd" id="1_748nq"]
55
[ext_resource type="Texture2D" uid="uid://c0j4px4n72di5" path="res://material_maker/icons/icons.tres" id="3"]
6+
[ext_resource type="Texture2D" uid="uid://1s0c37uoj4rf" path="res://material_maker/theme/default_theme_icons.svg" id="5_55s42"]
67

78
[sub_resource type="AtlasTexture" id="1"]
89
atlas = ExtResource("3")
910
region = Rect2(0, 0, 16, 16)
1011

12+
[sub_resource type="AtlasTexture" id="AtlasTexture_xdn16"]
13+
atlas = ExtResource("5_55s42")
14+
region = Rect2(0, 64, 15, 16)
15+
1116
[node name="Library" type="PanelContainer"]
1217
offset_right = 323.0
1318
offset_bottom = 391.0
@@ -66,12 +71,37 @@ auto_tooltip = false
6671
script = ExtResource("1")
6772

6873
[node name="GetFromWebsite" type="Button" parent="Library"]
74+
custom_minimum_size = Vector2(0, 24)
6975
layout_mode = 2
7076
size_flags_vertical = 4
7177
tooltip_text = "Get more nodes from website"
72-
text = "Browse Community Nodes"
7378
clip_text = true
7479

80+
[node name="HBoxContainer" type="HBoxContainer" parent="Library/GetFromWebsite"]
81+
layout_mode = 1
82+
anchors_preset = 8
83+
anchor_left = 0.5
84+
anchor_top = 0.5
85+
anchor_right = 0.5
86+
anchor_bottom = 0.5
87+
offset_left = -113.0
88+
offset_top = -11.5
89+
offset_right = 113.0
90+
offset_bottom = 11.5
91+
grow_horizontal = 2
92+
grow_vertical = 2
93+
theme_override_constants/separation = 1
94+
95+
[node name="Download" type="TextureRect" parent="Library/GetFromWebsite/HBoxContainer"]
96+
unique_name_in_owner = true
97+
layout_mode = 2
98+
texture = SubResource("AtlasTexture_xdn16")
99+
expand_mode = 2
100+
101+
[node name="Label" type="Label" parent="Library/GetFromWebsite/HBoxContainer"]
102+
layout_mode = 2
103+
text = "Browse Community Nodes"
104+
75105
[node name="ItemMenu" type="PopupMenu" parent="."]
76106
unique_name_in_owner = true
77107
item_count = 6

material_maker/theme/classic_base.tres

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@ region = Rect2(64, 160, 16, 16)
422422
atlas = ExtResource("1_fw8f4")
423423
region = Rect2(32, 16, 16, 16)
424424

425+
[sub_resource type="AtlasTexture" id="AtlasTexture_wbe58"]
426+
atlas = ExtResource("1_fw8f4")
427+
region = Rect2(0, 64, 16, 16)
428+
metadata/scale = 2.0
429+
425430
[sub_resource type="AtlasTexture" id="AtlasTexture_oy0ko"]
426431
atlas = ExtResource("1_fw8f4")
427432
region = Rect2(64, 0, 16, 16)
@@ -1107,6 +1112,7 @@ MM_Icons/icons/arrow_right = SubResource("AtlasTexture_r3xak")
11071112
MM_Icons/icons/arrow_updown = SubResource("AtlasTexture_dnklm")
11081113
MM_Icons/icons/color_picker = SubResource("AtlasTexture_7ns35")
11091114
MM_Icons/icons/delete = SubResource("AtlasTexture_agwde")
1115+
MM_Icons/icons/download = SubResource("AtlasTexture_wbe58")
11101116
MM_Icons/icons/draw = SubResource("AtlasTexture_oy0ko")
11111117
MM_Icons/icons/dropdown = SubResource("AtlasTexture_2gawd")
11121118
MM_Icons/icons/environment = SubResource("AtlasTexture_x8swe")

material_maker/theme/default.tres

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,11 @@ region = Rect2(64, 192, 16, 16)
491491
atlas = ExtResource("1_s43fy")
492492
region = Rect2(32, 16, 16, 16)
493493

494+
[sub_resource type="AtlasTexture" id="AtlasTexture_0jwmg"]
495+
atlas = ExtResource("1_s43fy")
496+
region = Rect2(0, 64, 16, 16)
497+
metadata/scale = 2.0
498+
494499
[sub_resource type="AtlasTexture" id="AtlasTexture_oy0ko"]
495500
atlas = ExtResource("1_s43fy")
496501
region = Rect2(64, 0, 16, 16)
@@ -1337,6 +1342,7 @@ MM_Icons/icons/connection_direct = SubResource("AtlasTexture_pfiqs")
13371342
MM_Icons/icons/connection_manhattan = SubResource("AtlasTexture_pfsii")
13381343
MM_Icons/icons/connection_rounded = SubResource("AtlasTexture_1lfk8")
13391344
MM_Icons/icons/delete = SubResource("AtlasTexture_agwde")
1345+
MM_Icons/icons/download = SubResource("AtlasTexture_0jwmg")
13401346
MM_Icons/icons/draw = SubResource("AtlasTexture_oy0ko")
13411347
MM_Icons/icons/dropdown = SubResource("AtlasTexture_2gawd")
13421348
MM_Icons/icons/environment = SubResource("AtlasTexture_x8swe")

0 commit comments

Comments
 (0)