1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-11 08:15:35 +03:00

Icon cleanup

This commit is contained in:
Anuken 2020-11-05 22:05:32 -05:00
parent 83bc5bbc60
commit ad3ce9fb14
24 changed files with 959 additions and 575 deletions

2
.gitignore vendored
View File

@ -24,6 +24,8 @@ logs/
changelog
saves/
/core/assets-raw/fontgen/out/
/core/assets-raw/fontgen/icons/
/core/assets-raw/fontgen/icon_parts/
core/assets/saves/
/core/assets/saves/
steam_appid.txt

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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="12"
height="12"
version="1.1"
id="svg380"
sodipodi:docname="admin.svg"
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata
id="metadata386">
<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>
<defs
id="defs384" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1316"
id="namedview382"
showgrid="false"
inkscape:zoom="64.285714"
inkscape:cx="6"
inkscape:cy="6"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg380" />
<path
id="polygon2"
style="fill:#ffffff"
d="M 2.5,0 2,0.5 1.5,1 1,1.5 0.5,2 0,2.5 v 1 1 1 1 L 0.5,7 1,7.5 v 1 1 L 1.5,10 2,10.5 2.5,11 3,11.5 3.5,12 h 1 1 1 1 1 L 9,11.5 9.5,11 10,10.5 10.5,10 11,9.5 v -1 -1 L 11.5,7 12,6.5 v -1 -1 -1 -1 L 11.5,2 11,1.5 10.5,1 10,0.5 9.5,0 h -1 -1 -1 -1 -1 -1 z m 2,3 h 1 1 1 L 8,3.5 8.5,4 9,4.5 v 1 L 8.5,6 8,6.5 7.5,7 h -1 -1 -1 L 4,6.5 3.5,6 3,5.5 v -1 L 3.5,4 4,3.5 Z M 5.5,4 5,4.5 v 1 L 5.5,6 h 1 L 7,5.5 v -1 L 6.5,4 Z m -1,4 h 1 1 1 L 8,8.5 7.5,9 h -1 -1 -1 L 4,8.5 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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="10"
height="10"
version="1.1"
id="svg192"
sodipodi:docname="distribution.svg"
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata
id="metadata198">
<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>
<defs
id="defs196" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1316"
id="namedview194"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="90"
inkscape:cx="5"
inkscape:cy="5"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg192" />
<path
id="polygon2"
style="fill:#ffffff"
d="M 0.5,0 0,0.5 v 1 1 1 1 1 1 1 1 1 L 0.5,10 1,9.5 v -1 -1 -1 -1 -1 -1 -1 -1 -1 z M 9.5,0 9,0.5 v 1 1 1 1 1 1 1 1 1 L 9.5,10 10,9.5 v -1 -1 -1 -1 -1 -1 -1 -1 -1 z M 4.5,1 4,1.5 3.5,2 3,2.5 3.5,3 h 1 1 1 L 7,2.5 6.5,2 6,1.5 5.5,1 Z M 4.5,4 4,4.5 3.5,5 3,5.5 3.5,6 h 1 1 1 L 7,5.5 6.5,5 6,4.5 5.5,4 Z M 4.5,7 4,7.5 3.5,8 3,8.5 3.5,9 h 1 1 1 L 7,8.5 6.5,8 6,7.5 5.5,7 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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="10"
height="10"
version="1.1"
id="svg252"
sodipodi:docname="effect.svg"
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata
id="metadata258">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs256" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1316"
id="namedview254"
showgrid="false"
inkscape:zoom="90"
inkscape:cx="5"
inkscape:cy="5"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg252" />
<path
id="polygon2"
style="fill:#ffffff"
d="M 1.5,0 1,0.5 0.5,1 0,1.5 v 1 1 1 1 1 1 1 L 0.5,9 1,9.5 1.5,10 h 1 1 1 1 1 1 1 L 9,9.5 9.5,9 10,8.5 v -1 -1 -1 -1 -1 -1 -1 L 9.5,1 9,0.5 8.5,0 h -1 -1 -1 -1 -1 -1 z m 1,1 h 1 1 1 1 1 L 8,1.5 8.5,2 9,2.5 v 1 1 1 1 1 L 8.5,8 8,8.5 7.5,9 h -1 -1 -1 -1 -1 L 2,8.5 1.5,8 1,7.5 v -1 -1 -1 -1 -1 L 1.5,2 2,1.5 Z M 4.5,3 4,3.5 3.5,4 3,4.5 v 1 L 3.5,6 4,6.5 4.5,7 h 1 L 6,6.5 6.5,6 7,5.5 v -1 L 6.5,4 6,3.5 5.5,3 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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="10"
height="13"
version="1.1"
id="svg310"
sodipodi:docname="file-image.svg"
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata
id="metadata316">
<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>
<defs
id="defs314" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1316"
id="namedview312"
showgrid="false"
inkscape:zoom="79.549513"
inkscape:cx="1.5476722"
inkscape:cy="6.573236"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg310"
inkscape:pagecheckerboard="true" />
<path
id="polygon2"
style="fill:#ffffff"
d="M 0.5,0 0,0.5 v 1 1 1 1 1 1 1 1 1 1 1 1 L 0.5,13 h 1 1 1 1 1 1 1 1 1 L 10,12.5 v -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 L 9.5,2 9,1.5 8.5,1 8,0.5 7.5,0 h -1 -1 -1 -1 -1 -1 z m 1,1 h 1 1 1 L 5,1.5 v 1 1 1 L 5.5,5 h 1 1 1 L 9,5.5 v 1 1 1 1 1 1 L 8.5,12 h -1 -1 -1 -1 -1 -1 -1 L 1,11.5 v -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 z m 5,0 h 1 L 8,1.5 8.5,2 9,2.5 v 1 L 8.5,4 h -1 -1 L 6,3.5 v -1 -1 z M 6.5,6 6,6.5 v 1 L 6.5,8 h 1 L 8,7.5 v -1 L 7.5,6 Z M 4.5,7 4,7.5 3.5,8 3,8.5 v 1 L 2.5,10 2,10.5 2.5,11 h 1 1 1 1 L 7,10.5 6.5,10 6,9.5 5.5,9 5,8.5 v -1 z" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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="12"
height="12"
version="1.1"
id="svg300"
sodipodi:docname="info.svg"
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata
id="metadata306">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs304" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1316"
id="namedview302"
showgrid="false"
inkscape:zoom="64.285714"
inkscape:cx="6"
inkscape:cy="6"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg300" />
<path
id="polygon2"
style="fill:#ffffff"
d="M 0.5,0 0,0.5 v 1 1 1 1 1 1 1 1 1 1 1 L 0.5,12 h 1 1 1 1 1 1 1 1 1 1 1 L 12,11.5 v -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 L 11.5,0 h -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 z m 2,2 h 1 1 1 1 1 1 1 L 10,2.5 v 1 1 1 1 1 1 1 L 9.5,10 h -1 -1 -1 -1 -1 -1 -1 L 2,9.5 v -1 -1 -1 -1 -1 -1 -1 z M 5.5,3 5,3.5 v 1 L 5.5,5 h 1 L 7,4.5 v -1 L 6.5,3 Z M 5.5,6 5,6.5 v 1 1 L 5.5,9 h 1 L 7,8.5 v -1 -1 L 6.5,6 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,3 +1,3 @@
Open("core/assets/fonts/font.woff")
MergeFonts("core/assets-raw/fontgen/out/font.woff")
Generate("core/assets/fonts/font.woff")
Open($2)
MergeFonts($1)
Generate($1)

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Binary file not shown.

View File

@ -205,7 +205,7 @@ public class MobileInput extends InputHandler implements GestureListener{
boolean arrow = block != null && block.rotate;
i.getImage().setRotationOrigin(!arrow ? 0 : rotation * 90, Align.center);
i.getStyle().imageUp = arrow ? Icon.right : Icon.paste;
i.getStyle().imageUp = arrow ? Icon.right : Icon.copy;
i.setChecked(!arrow && schematicMode);
});

View File

@ -90,14 +90,14 @@ public abstract class FilterOption{
@Override
public void build(Table table){
table.button(b -> b.image(supplier.get().icon(Cicon.small)).update(i -> ((TextureRegionDrawable)i.getDrawable())
.setRegion(supplier.get() == Blocks.air ? Icon.block.getRegion() : supplier.get().icon(Cicon.small))).size(8 * 3), () -> {
.setRegion(supplier.get() == Blocks.air ? Icon.none.getRegion() : supplier.get().icon(Cicon.small))).size(8 * 3), () -> {
BaseDialog dialog = new BaseDialog("");
dialog.setFillParent(false);
int i = 0;
for(Block block : Vars.content.blocks()){
if(!filter.get(block)) continue;
dialog.cont.image(block == Blocks.air ? Icon.block.getRegion() : block.icon(Cicon.medium)).size(8 * 4).pad(3).get().clicked(() -> {
dialog.cont.image(block == Blocks.air ? Icon.none.getRegion() : block.icon(Cicon.medium)).size(8 * 4).pad(3).get().clicked(() -> {
consumer.get(block);
dialog.hide();
changed.run();

View File

@ -173,7 +173,7 @@ public class MenuFragment extends Fragment{
new Buttoni("@tutorial", Icon.info, () -> checkPlay(control::playTutorial))
),
new Buttoni("@editor", Icon.terrain, () -> checkPlay(ui.maps::show)), steam ? new Buttoni("@workshop", Icon.book, platform::openWorkshop) : null,
new Buttoni(Core.bundle.get("mods"), Icon.bookOpen, ui.mods::show),
new Buttoni("@mods", Icon.book, ui.mods::show),
//not enough space for this button
//new Buttoni("@schematics", Icon.paste, ui.schematics::show),
new Buttoni("@settings", Icon.settings, ui.settings::show),

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=73b7d84c43621e935d0281160b4d3caed7d77222
archash=3bd087c3dac6e220c31e0d33067557af5f382d05

View File

@ -46,7 +46,13 @@ public class FontGenerator{
Log.info("Merge...");
OS.exec("fontforge", "-script", "core/assets-raw/fontgen/merge.pe");
//TODO this is broken
Log.info(OS.exec("fontforge", "-script",
Fi.get("core/assets-raw/fontgen/merge.pe").absolutePath(),
Fi.get("core/assets/fonts/font.woff").absolutePath(),
Fi.get("core/assets-raw/fontgen/out/font.woff").absolutePath())
);
Log.info("Done.");
}