jif support

This commit is contained in:
notdraimdev
2024-10-27 14:46:18 +01:00
parent 81c30245c4
commit 810d5c40de
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ transient = false
ok_button_text = "Open" ok_button_text = "Open"
file_mode = 0 file_mode = 0
access = 2 access = 2
filters = PackedStringArray("*.png", "*.jpg", "*.jpeg", "*") filters = PackedStringArray("*.png", "*.jpg ", "*.jpeg", "*.gif", "*")
show_hidden_files = true show_hidden_files = true
use_native_dialog = true use_native_dialog = true
+4 -1
View File
@@ -170,7 +170,10 @@ func _on_select_bg_dialog_file_selected(path: String) -> void:
Parent.CurrentCustomBackroundImageDirectory = path Parent.CurrentCustomBackroundImageDirectory = path
backround_dir_label.text = path backround_dir_label.text = path
#print(path) #print(path)
Parent.user_bg.texture = ImageTexture.create_from_image(Image.load_from_file(CurrentBGImagePath)) if !path.ends_with(".gif"):
Parent.user_bg.texture = ImageTexture.create_from_image(Image.load_from_file(CurrentBGImagePath))
else:
Parent.user_bg.texture = GifManager.animated_texture_from_file(path)
Parent.SaveEverything() Parent.SaveEverything()
func _on_reset_bg_pressed() -> void: func _on_reset_bg_pressed() -> void: