Skip to content

Commit b4670a3

Browse files
committed
Merge branch 'main' of https://github.com/coppolaemilio/dialogic into main
2 parents 948087f + 34180cb commit b4670a3

File tree

3 files changed

+24
-25
lines changed

3 files changed

+24
-25
lines changed
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
[gd_resource type="StyleBoxFlat" format=2]
2-
3-
[resource]
4-
content_margin_left = 0.0
5-
content_margin_right = 0.0
6-
content_margin_top = 0.0
7-
content_margin_bottom = 0.0
8-
bg_color = Color( 0.160784, 0.423529, 0.309804, 0.447059 )
9-
border_width_left = 2
10-
border_width_top = 2
11-
border_width_right = 2
12-
border_width_bottom = 2
13-
border_color = Color( 0.12549, 0.12549, 0.12549, 1 )
14-
corner_radius_top_left = 6
15-
corner_radius_top_right = 6
16-
corner_radius_bottom_right = 6
17-
corner_radius_bottom_left = 6
1+
[gd_resource type="StyleBoxFlat" format=2]
2+
3+
[resource]
4+
content_margin_left = 0.0
5+
content_margin_right = 0.0
6+
content_margin_top = 0.0
7+
content_margin_bottom = 0.0
8+
bg_color = Color( 0.160784, 0.423529, 0.309804, 0.447059 )
9+
border_width_left = 2
10+
border_width_top = 2
11+
border_width_right = 2
12+
border_width_bottom = 2
13+
border_color = Color( 0.12549, 0.12549, 0.12549, 1 )
14+
corner_radius_top_left = 6
15+
corner_radius_top_right = 6
16+
corner_radius_bottom_right = 6
17+
corner_radius_bottom_left = 6

addons/dialogic/Editor/MasterTree/MasterTree.gd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,9 @@ func _on_item_rmb_selected(position):
433433
func get_item_folder(item: TreeItem, root : String):
434434
if not item:
435435
return root
436-
var current_path:String = ""
436+
var current_path:String = get_item_path(item)
437437
if not "Root" in item.get_metadata(0)['editor']:
438438
current_path = DialogicUtil.get_parent_path(current_path)
439-
else:
440-
current_path = get_item_path(item)
441439
if not current_path.begins_with(root):
442440
return root
443441
return current_path

addons/dialogic/Nodes/random_audio_stream_player.gd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ func load_samples_from_folder(path):
7979
dir.list_dir_begin(true)
8080
var file_name = dir.get_next()
8181
while file_name != "":
82-
if not dir.current_is_dir():
83-
var f = file_name.replace('.import', '')
84-
if f.to_lower().ends_with(".wav") or f.to_lower().ends_with(".ogg"):
85-
var resource = ResourceLoader.load(dir.get_current_dir() + "/" + f)
86-
samples.append(resource)
82+
if not dir.current_is_dir() and file_name.ends_with(".import"):
83+
var resource_path = dir.get_current_dir() + "/" + file_name.replace('.import', '')
84+
if resource_path.get_extension().to_lower() in ["wav", "ogg"]:
85+
var resource = load(resource_path)
86+
if resource != null:
87+
samples.append(resource)
8788
file_name = dir.get_next()
8889
select_samples_from_folder = ""

0 commit comments

Comments
 (0)