summaryrefslogtreecommitdiff
path: root/tools/editor/icons/make_icons.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/icons/make_icons.py')
-rw-r--r--tools/editor/icons/make_icons.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/editor/icons/make_icons.py b/tools/editor/icons/make_icons.py
index 9752fef6fe..e06cbac720 100644
--- a/tools/editor/icons/make_icons.py
+++ b/tools/editor/icons/make_icons.py
@@ -10,29 +10,29 @@ f.write("#include \"editor_icons.h\"\n\n")
f.write("#include \"scene/resources/theme.h\"\n\n")
for x in pixmaps:
-
+
var_str=x[:-4]+"_png";
-
+
f.write("static const unsigned char "+ var_str +"[]={\n");
-
+
pngf=open(x,"rb");
-
+
b=pngf.read(1);
while(len(b)==1):
f.write(hex(ord(b)))
b=pngf.read(1);
if (len(b)==1):
f.write(",")
-
+
f.write("\n};\n\n\n");
pngf.close();
-
+
f.write("static Ref<ImageTexture> make_icon(const uint8_t* p_png) {\n")
f.write("\tRef<ImageTexture> texture( memnew( ImageTexture ) );\n")
f.write("\ttexture->create_from_image( Image(p_png),ImageTexture::FLAG_FILTER );\n")
f.write("\treturn texture;\n")
f.write("}\n\n")
-
+
f.write("void editor_register_icons(Ref<Theme> p_theme) {\n\n")