MakovWait / godots

🚀Ultimate go-to hub for managing your Godot versions and projects! 🚀
MIT License
322 stars 25 forks source link

add ability to select icon.svg in settings #62

Closed BasilYes closed 8 months ago

BasilYes commented 8 months ago

Add ability to select icon.svg inside new project instead of icon.png #61

MakovWait commented 8 months ago

This will not work in export builds:

DirAccess.copy_absolute("res://assets/default_project_icon.svg", dir.path_join("icon.svg"))

seems like there is some workaround.

I'm not sure if global settings is where you should put the checkbox: I think the better place is to put it in the new project dialog.

BasilYes commented 8 months ago

This will not work in export builds:

DirAccess.copy_absolute("res://assets/default_project_icon.svg", dir.path_join("icon.svg"))

seems like there is some workaround.

Thanks, I don't noticed this. But this workaround didn't work too, so I done another workaround and it's work.

I'm not sure if global settings is where you should put the checkbox: I think the better place is to put it in the new project dialog.

Yes, it's will be better.

BasilYes commented 8 months ago

May be Godots should remember user choose (.svg or .png), but I'm not sure how to implement this properly.

MakovWait commented 8 months ago

May be Godots should remember user choose (.svg or .png), but I'm not sure how to implement this properly.

for this we use cache for instance: https://github.com/MakovWait/godots/blob/cf4b11bba4cbd597ad32885b29a1f1b29b80cb06/src/components/editors/remote/remote_editors.gd#L23-L24

So it may look like:

var use_png = Cache.smart_value(self, "use_png", true)

use_png.ret()
use_png.put(new_val)
BasilYes commented 8 months ago

Done

MakovWait commented 8 months ago

Cool thanks!