diff options
Diffstat (limited to 'tools/editor/icons')
-rw-r--r-- | tools/editor/icons/2x/icon_load.png | bin | 228 -> 503 bytes | |||
-rw-r--r-- | tools/editor/icons/2x/icon_open.png | bin | 228 -> 0 bytes | |||
-rw-r--r-- | tools/editor/icons/2x/icon_script_create.png | bin | 0 -> 541 bytes | |||
-rw-r--r-- | tools/editor/icons/SCsub | 130 | ||||
-rw-r--r-- | tools/editor/icons/icon_load.png | bin | 170 -> 301 bytes | |||
-rw-r--r-- | tools/editor/icons/icon_open.png | bin | 170 -> 0 bytes | |||
-rw-r--r-- | tools/editor/icons/icon_script_create.png | bin | 0 -> 341 bytes | |||
-rw-r--r-- | tools/editor/icons/source/icon_load.svg | 85 | ||||
-rw-r--r-- | tools/editor/icons/source/icon_script_create.svg | 96 |
9 files changed, 246 insertions, 65 deletions
diff --git a/tools/editor/icons/2x/icon_load.png b/tools/editor/icons/2x/icon_load.png Binary files differindex 2e797c448b..729eedd2dd 100644 --- a/tools/editor/icons/2x/icon_load.png +++ b/tools/editor/icons/2x/icon_load.png diff --git a/tools/editor/icons/2x/icon_open.png b/tools/editor/icons/2x/icon_open.png Binary files differdeleted file mode 100644 index 2e797c448b..0000000000 --- a/tools/editor/icons/2x/icon_open.png +++ /dev/null diff --git a/tools/editor/icons/2x/icon_script_create.png b/tools/editor/icons/2x/icon_script_create.png Binary files differnew file mode 100644 index 0000000000..67f80e8760 --- /dev/null +++ b/tools/editor/icons/2x/icon_script_create.png diff --git a/tools/editor/icons/SCsub b/tools/editor/icons/SCsub index e9054f30d9..f86ae2b10d 100644 --- a/tools/editor/icons/SCsub +++ b/tools/editor/icons/SCsub @@ -1,96 +1,96 @@ -Import('env') - -def make_editor_icons_action(target, source, env): +#!/usr/bin/env python - import os - import cStringIO +Import('env') - dst = target[0].srcnode().abspath - pixmaps = source - s = cStringIO.StringIO() +def make_editor_icons_action(target, source, env): - s.write("#include \"editor_icons.h\"\n\n") - s.write("#include \"editor_scale.h\"\n\n") - s.write("#include \"scene/resources/theme.h\"\n\n") + import os + import cStringIO - hidpi_list=[] + dst = target[0].srcnode().abspath + pixmaps = source - for x in pixmaps: + s = cStringIO.StringIO() - x=str(x) - var_str=os.path.basename(x)[:-4]+"_png"; - #print(var_str) + s.write("#include \"editor_icons.h\"\n\n") + s.write("#include \"editor_scale.h\"\n\n") + s.write("#include \"scene/resources/theme.h\"\n\n") - s.write("static const unsigned char "+ var_str +"[]={\n"); + hidpi_list = [] - pngf=open(x,"rb"); + for x in pixmaps: - b=pngf.read(1); - while(len(b)==1): - s.write(hex(ord(b))) - b=pngf.read(1); - if (len(b)==1): - s.write(",") + x = str(x) + var_str = os.path.basename(x)[:-4] + "_png" + # print(var_str) - s.write("\n};\n\n"); + s.write("static const unsigned char " + var_str + "[]={\n") - pngf.close(); - var_str=os.path.basename(x)[:-4]+"_hidpi_png"; - try: + pngf = open(x, "rb") - pngf = open(os.path.dirname(x)+"/2x/"+os.path.basename(x), "rb") + b = pngf.read(1) + while(len(b) == 1): + s.write(hex(ord(b))) + b = pngf.read(1) + if (len(b) == 1): + s.write(",") - s.write("static const unsigned char "+ var_str +"[]={\n"); + s.write("\n};\n\n") - b=pngf.read(1); - while(len(b)==1): - s.write(hex(ord(b))) - b=pngf.read(1); - if (len(b)==1): - s.write(",") + pngf.close() + var_str = os.path.basename(x)[:-4] + "_hidpi_png" + try: - s.write("\n};\n\n\n"); - hidpi_list.append(x) + pngf = open(os.path.dirname(x) + "/2x/" + os.path.basename(x), "rb") - except: - s.write("static const unsigned char* "+ var_str +"=NULL;\n\n\n"); + s.write("static const unsigned char " + var_str + "[]={\n") + b = pngf.read(1) + while(len(b) == 1): + s.write(hex(ord(b))) + b = pngf.read(1) + if (len(b) == 1): + s.write(",") + s.write("\n};\n\n\n") + hidpi_list.append(x) + except: + s.write("static const unsigned char* " + var_str + "=NULL;\n\n\n") - 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("\ttexture->create_from_image( img,ImageTexture::FLAG_FILTER );\n") - s.write("\treturn texture;\n") - s.write("}\n\n") + 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("\ttexture->create_from_image( img,ImageTexture::FLAG_FILTER );\n") + s.write("\treturn texture;\n") + s.write("}\n\n") - s.write("void editor_register_icons(Ref<Theme> p_theme) {\n\n") + s.write("void editor_register_icons(Ref<Theme> p_theme) {\n\n") - for x in pixmaps: + for x in pixmaps: - x=os.path.basename(str(x)) - type=x[5:-4].title().replace("_",""); - var_str=x[:-4]+"_png"; - var_str_hidpi=x[:-4]+"_hidpi_png"; - s.write("\tp_theme->set_icon(\""+type+"\",\"EditorIcons\",make_icon("+var_str+","+var_str_hidpi+"));\n"); + x = os.path.basename(str(x)) + type = x[5:-4].title().replace("_", "") + var_str = x[:-4] + "_png" + var_str_hidpi = x[:-4] + "_hidpi_png" + s.write("\tp_theme->set_icon(\"" + type + "\",\"EditorIcons\",make_icon(" + var_str + "," + var_str_hidpi + "));\n") - s.write("\n\n}\n\n"); + s.write("\n\n}\n\n") - f = open(dst,"wb") - f.write(s.getvalue()) - f.close() - s.close() + f = open(dst, "wb") + f.write(s.getvalue()) + f.close() + s.close() make_editor_icons_builder = Builder(action=make_editor_icons_action, - suffix = '.cpp', - src_suffix = '.png') -env['BUILDERS']['MakeEditorIconsBuilder']=make_editor_icons_builder -env.Alias('editor_icons',[env.MakeEditorIconsBuilder('#tools/editor/editor_icons.cpp',Glob("*.png"))]) + suffix='.cpp', + src_suffix='.png') +env['BUILDERS']['MakeEditorIconsBuilder'] = make_editor_icons_builder +env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#tools/editor/editor_icons.cpp', Glob("*.png"))]) env.tool_sources.append("#tools/editor/editor_icons.cpp") Export('env') diff --git a/tools/editor/icons/icon_load.png b/tools/editor/icons/icon_load.png Binary files differindex cc05e98ebb..98da8135f2 100644 --- a/tools/editor/icons/icon_load.png +++ b/tools/editor/icons/icon_load.png diff --git a/tools/editor/icons/icon_open.png b/tools/editor/icons/icon_open.png Binary files differdeleted file mode 100644 index cc05e98ebb..0000000000 --- a/tools/editor/icons/icon_open.png +++ /dev/null diff --git a/tools/editor/icons/icon_script_create.png b/tools/editor/icons/icon_script_create.png Binary files differnew file mode 100644 index 0000000000..f5d8b0cfd6 --- /dev/null +++ b/tools/editor/icons/icon_script_create.png diff --git a/tools/editor/icons/source/icon_load.svg b/tools/editor/icons/source/icon_load.svg new file mode 100644 index 0000000000..f8e78fb4ea --- /dev/null +++ b/tools/editor/icons/source/icon_load.svg @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + viewBox="0 0 16 16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + inkscape:export-filename="/home/godotengine/godot/tools/editor/icons/2x/icon_load.png" + inkscape:export-xdpi="180" + inkscape:export-ydpi="180" + sodipodi:docname="icon_load.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.627417" + inkscape:cx="12.685427" + inkscape:cy="1.6294402" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="px" + inkscape:snap-bbox="true" + inkscape:bbox-paths="true" + inkscape:bbox-nodes="true" + inkscape:snap-bbox-edge-midpoints="true" + inkscape:snap-bbox-midpoints="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1119" + inkscape:window-x="0" + inkscape:window-y="26" + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true" + showguides="false"> + <inkscape:grid + type="xygrid" + id="grid3336" + spacingx="0.5" + spacingy="0.5" + empspacing="2" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <path + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="M 1.5000703,2 C 1.0834036,2 0.7251221,2.1928844 0.4590547,2.4589844 0.1929873,2.7250844 7.03e-5,3.0834 7.03e-5,3.5 l 0.5,8.5 c 0.041565,0.581917 0.1536332,1.110716 0.5214844,1.478516 C 1.3894058,13.846416 1.916737,14 2.5000703,14 l 0.5,0 0.5,0 9.9997657,0 c 0.231666,-10e-5 0.432919,-0.159266 0.486328,-0.384766 l 2,-7.4999996 C 16.060474,5.8013344 15.822456,5.5002 15.499836,5.5 L 4.7559297,5.5 C 4.5236856,5.5003 4.3126587,5.6584963 4.2696015,5.8867188 L 3.0383769,12.412759 C 2.9838992,12.701515 2.7130529,12.963778 2.2988984,12.972656 1.7175274,12.985119 1.5058274,12.46121 1.5000703,12 l -0.5,-8.5 c 0,-0.083 0.057083,-0.2249844 0.1660156,-0.3339844 C 1.2750185,3.0571156 1.416737,3 1.5000703,3 L 12.499836,3 c 0.08333,0 0.225052,0.057016 0.333984,0.1660156 0.108933,0.109 0.224913,0.2750776 0.166016,0.3339844 l 0,1 1,0 0,-1 c 0,-0.4166 -0.192917,-0.7749156 -0.458984,-1.0410156 C 13.274784,2.1928844 12.916503,2 12.499836,2 Z" + transform="translate(0,1036.3622)" + id="path8167" + inkscape:connector-curvature="0" + sodipodi:nodetypes="sscccscccccccssscccssssccssss" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_script_create.svg b/tools/editor/icons/source/icon_script_create.svg new file mode 100644 index 0000000000..c3f69c4601 --- /dev/null +++ b/tools/editor/icons/source/icon_script_create.svg @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + viewBox="0 0 16 16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + inkscape:export-filename="/home/godotengine/godot/tools/editor/icons/con_script_create.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_script_create.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="29.966667" + inkscape:cx="5.495872" + inkscape:cy="2.1206692" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + units="px" + inkscape:snap-bbox="true" + inkscape:bbox-paths="true" + inkscape:bbox-nodes="true" + inkscape:snap-bbox-edge-midpoints="true" + inkscape:snap-bbox-midpoints="true" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1119" + inkscape:window-x="0" + inkscape:window-y="26" + inkscape:window-maximized="1" + showguides="false"> + <inkscape:grid + type="xygrid" + id="grid3336" + empspacing="4" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <path + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + d="M 6 1 L 6 2 A 1 1 0 0 0 5 3 L 5 13 L 4 13 L 4 11 L 2 11 L 2 13 A 1 1 0 0 0 2.5 13.865234 A 1 1 0 0 0 3 14 L 3 15 L 10 15 L 10 14 L 7 14 L 7 10 L 10 10 L 10 7 L 12 7 L 12 5 L 15 5 L 15 3 A 2 2 0 0 0 13 1 L 6 1 z M 11 8 L 11 11 L 8 11 L 8 13 L 11 13 L 11 14.730469 A 2 2 0 0 0 12 13 L 12 8 L 11 8 z " + transform="translate(0,1036.3622)" + id="rect4255" /> + <path + style="opacity:1;fill:#b4b4b4;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + d="M 6 1 C 4.8954305 1 4 1.8954305 4 3 L 4 10 L 2 10 L 1 10 L 1 11 L 1 13 C 1 14.104569 1.8954305 15 3 15 C 4.1045695 15 5 14.104569 5 13 L 5 3 C 5 2.4477153 5.4477153 2 6 2 C 6.5522847 2 7 2.4477153 7 3 L 7 4 L 7 5 L 7 6 L 8 6 L 12 6 L 12 5 L 8 5 L 8 4 L 8 3 C 8 1.8954305 7.1045695 1 6 1 z M 2 11 L 4 11 L 4 13 C 4 13.552285 3.5522847 14 3 14 C 2.4477153 14 2 13.552285 2 13 L 2 11 z " + transform="translate(0,1036.3622)" + id="path4265" /> + <circle + cy="1048.3622" + cx="3" + id="ellipse4234" + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + ry="1.0000174" + rx="1" /> + <path + style="fill:#e0e0e0;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" + d="m 13,1049.3622 3,0 0,-2 -3,0 0,-3 -2,0 0,3 -3,0 0,2 3,0 0,3 2,0 z" + id="path8069" + inkscape:connector-curvature="0" /> + </g> +</svg> |