Skip to content

Commit

Permalink
Merge pull request #2503 from orangemelon69/main
Browse files Browse the repository at this point in the history
Feat: background file can now be loaded from user:// scope too
  • Loading branch information
zaknafean authored Jan 3, 2025
2 parents 94989bc + 2c952b7 commit 3efe717
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ func _update_background(argument:String, _time:float) -> void:
if argument.begins_with('res://'):
image_node.texture = load(argument)
color_node.color = Color.TRANSPARENT
elif argument.begins_with('user://'):
var ext_image = Image.load_from_file(argument)
image_node.texture = ImageTexture.create_from_image(ext_image)
color_node.color = Color.TRANSPARENT
elif argument.is_valid_html_color():
image_node.texture = null
color_node.color = Color(argument, 1)
Expand Down

0 comments on commit 3efe717

Please sign in to comment.