summaryrefslogtreecommitdiff
path: root/editor/icons
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-05-17 07:36:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-05-17 07:37:45 -0300
commit98a329670227c726a5d7a196e5cba8dbdd54301b (patch)
tree7346f7a3e38eb35b784ac1a68a227d07cc8881b4 /editor/icons
parentd801ff2b3db2de105c1b36a74ce116e360143d4e (diff)
Removal of Image from Variant, converted to a Resource.
Diffstat (limited to 'editor/icons')
-rw-r--r--editor/icons/SCsub6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index 3fc8e5461f..20a381cc78 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -62,9 +62,9 @@ def make_editor_icons_action(target, source, env):
s.write("static Ref<ImageTexture> make_icon(const uint8_t* p_png,const uint8_t* p_hidpi_png) {\n")
s.write("\tRef<ImageTexture> texture( memnew( ImageTexture ) );\n")
s.write("\tbool use_hidpi_image=(editor_get_scale()>1.0&&p_hidpi_png);\n")
- s.write("\tImage img(use_hidpi_image?p_hidpi_png:p_png);\n")
- s.write("\tif (editor_get_scale()>1.0 && !p_hidpi_png) { img.convert(Image::FORMAT_RGBA8); img.expand_x2_hq2x(); use_hidpi_image=true;}\n")
- s.write("\timg.resize(img.get_width()*EDSCALE/(use_hidpi_image?2:1),img.get_height()*EDSCALE/(use_hidpi_image?2:1));\n")
+ s.write("\tRef<Image> img = memnew(Image(use_hidpi_image?p_hidpi_png:p_png));\n")
+ s.write("\tif (editor_get_scale()>1.0 && !p_hidpi_png) { img->convert(Image::FORMAT_RGBA8); img->expand_x2_hq2x(); use_hidpi_image=true;}\n")
+ s.write("\timg->resize(img->get_width()*EDSCALE/(use_hidpi_image?2:1),img->get_height()*EDSCALE/(use_hidpi_image?2:1));\n")
s.write("\ttexture->create_from_image( img,ImageTexture::FLAG_FILTER );\n")
s.write("\treturn texture;\n")
s.write("}\n\n")