Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to select icon.svg in settings #62

Merged
merged 1 commit into from
Jan 6, 2024
Merged

add ability to select icon.svg in settings #62

merged 1 commit into from
Jan 6, 2024

Conversation

BasilYes
Copy link
Contributor

@BasilYes BasilYes commented Jan 6, 2024

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

@MakovWait
Copy link
Owner

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
Copy link
Contributor Author

BasilYes commented Jan 6, 2024

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
Copy link
Contributor Author

BasilYes commented Jan 6, 2024

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

@MakovWait
Copy link
Owner

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:

var _active_mirror_cache = Cache.smart_value(
self, "active_mirror", true

So it may look like:

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

use_png.ret()
use_png.put(new_val)

@BasilYes
Copy link
Contributor Author

BasilYes commented Jan 6, 2024

Done

@MakovWait
Copy link
Owner

Cool thanks!

@MakovWait MakovWait merged commit 6df8003 into MakovWait:main Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants