You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-04 17:04:49 +00:00
Removal of Image from Variant, converted to a Resource.
This commit is contained in:
@@ -4463,8 +4463,9 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) {
|
||||
{
|
||||
//todo make proper previews
|
||||
Ref<ImageTexture> pic = gui_base->get_icon("FileBig", "EditorIcons");
|
||||
Image img = pic->get_data();
|
||||
img.resize(48, 48); //meh
|
||||
Ref<Image> img = pic->get_data();
|
||||
img = img->duplicate();
|
||||
img->resize(48, 48); //meh
|
||||
Ref<ImageTexture> resized_pic = Ref<ImageTexture>(memnew(ImageTexture));
|
||||
resized_pic->create_from_image(img);
|
||||
preview = resized_pic;
|
||||
|
||||
Reference in New Issue
Block a user