Skip to content

Commit 2c952b7

Browse files
committed
Feat: background file can now be loaded from user:// scope too
1 parent 94989bc commit 2c952b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

addons/dialogic/Modules/Background/DefaultBackgroundScene/default_background.gd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ func _update_background(argument:String, _time:float) -> void:
1919
if argument.begins_with('res://'):
2020
image_node.texture = load(argument)
2121
color_node.color = Color.TRANSPARENT
22+
elif argument.begins_with('user://'):
23+
var ext_image = Image.load_from_file(argument)
24+
image_node.texture = ImageTexture.create_from_image(ext_image)
25+
color_node.color = Color.TRANSPARENT
2226
elif argument.is_valid_html_color():
2327
image_node.texture = null
2428
color_node.color = Color(argument, 1)

0 commit comments

Comments
 (0)