You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Add static methods for creating Image and ImageTexture
This commit is contained in:
@@ -1167,9 +1167,7 @@ void ProjectList::load_project_icon(int p_index) {
|
||||
Error err = img->load(item.icon.replace_first("res://", item.path + "/"));
|
||||
if (err == OK) {
|
||||
img->resize(default_icon->get_width(), default_icon->get_height(), Image::INTERPOLATE_LANCZOS);
|
||||
Ref<ImageTexture> it = memnew(ImageTexture);
|
||||
it->create_from_image(img);
|
||||
icon = it;
|
||||
icon = ImageTexture::create_from_image(img);
|
||||
}
|
||||
}
|
||||
if (icon.is_null()) {
|
||||
|
||||
Reference in New Issue
Block a user