summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2020-06-21 21:06:21 +0000
committerIan C <ianc@noddybox.co.uk>2020-06-21 21:06:21 +0000
commit3723476ae9edc04a9495870e0cc21c5e8f1637dc (patch)
tree1fdc4dff7009041bb5efe42f5a481e01ec6b5698
parent40f02a62412772353933360996b0225e1be3f925 (diff)
Added icon and script to make icons. Added alert box to Utils.
-rwxr-xr-xMakeIcon.sh12
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128.pngbin4320 -> 4227 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.pngbin11190 -> 9169 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16.pngbin398 -> 460 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.pngbin717 -> 909 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256.pngbin11190 -> 9169 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.pngbin26923 -> 20192 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32.pngbin717 -> 909 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.pngbin1596 -> 1971 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512.pngbin26923 -> 20192 bytes
-rw-r--r--SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.pngbin61533 -> 46149 bytes
-rw-r--r--SpriteEd/Util.cs18
-rw-r--r--SpriteEdIcon.svg110
13 files changed, 140 insertions, 0 deletions
diff --git a/MakeIcon.sh b/MakeIcon.sh
new file mode 100755
index 0000000..2446873
--- /dev/null
+++ b/MakeIcon.sh
@@ -0,0 +1,12 @@
+INK=/Applications/Inkscape.app/Contents/MacOS/inkscape
+
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png -w 16 -h 16 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png -w 32 -h 32 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png -w 32 -h 32 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png -w 64 -h 64 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png -w 128 -h 128 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png -w 256 -h 256 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png -w 256 -h 256 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png -w 512 -h 512 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png -w 512 -h 512 SpriteEdIcon.svg
+$INK --export-filename=SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -w 1024 -h 1024 SpriteEdIcon.svg
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
index 7b432b1..1db583b 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
index 6802108..b4d9088 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
index bbde225..eeb0547 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
index 6d68a93..9b91e57 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png
index 6802108..b4d9088 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
index 6f1d2cc..b793618 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
index 6d68a93..9b91e57 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
index 5248646..44c0196 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png
index 6f1d2cc..b793618 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png
Binary files differ
diff --git a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
index 2ceaf28..3a32e2c 100644
--- a/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
+++ b/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
Binary files differ
diff --git a/SpriteEd/Util.cs b/SpriteEd/Util.cs
index 4bba750..cca9c47 100644
--- a/SpriteEd/Util.cs
+++ b/SpriteEd/Util.cs
@@ -16,6 +16,7 @@
//
using System;
using System.IO;
+using AppKit;
namespace SpriteEd
{
@@ -76,5 +77,22 @@ namespace SpriteEd
{
return s.ReadByte() == 255;
}
+
+ /// <summary>
+ /// Display an error alert.
+ /// </summary>
+ /// <param name="title">The title for the alert.</param>
+ /// <param name="message">The message for the alert.</param>
+ public static void DisplayAlert(string title, string message)
+ {
+ NSAlert alert = new NSAlert()
+ {
+ AlertStyle = NSAlertStyle.Critical,
+ InformativeText = message,
+ MessageText = title
+ };
+
+ alert.RunModal();
+ }
}
}
diff --git a/SpriteEdIcon.svg b/SpriteEdIcon.svg
new file mode 100644
index 0000000..228badc
--- /dev/null
+++ b/SpriteEdIcon.svg
@@ -0,0 +1,110 @@
+<?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="1024"
+ height="1024"
+ viewBox="0 0 270.93333 270.93333"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="SpriteEdIcon.svg"
+ inkscape:version="1.0 (4035a4f, 2020-05-01)"
+ inkscape:export-filename="/Users/ianc/src/SpriteEd/SpriteEd/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png"
+ inkscape:export-xdpi="1.5"
+ inkscape:export-ydpi="1.5">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.98994949"
+ inkscape:cx="308.59885"
+ inkscape:cy="569.88877"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer2"
+ inkscape:document-rotation="0"
+ showgrid="false"
+ units="px"
+ inkscape:window-width="2560"
+ inkscape:window-height="1315"
+ inkscape:window-x="0"
+ inkscape:window-y="23"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata5">
+ <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 />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Pacman"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ d="M 231.43365,229.31625 A 131.36298,131.49661 0 0 1 48.87053,230.80794 131.36298,131.49661 0 0 1 41.134277,48.217157 131.36298,131.49661 0 0 1 223.16796,34.229669 l -83.7869,101.275981 z"
+ sodipodi:arc-type="slice"
+ sodipodi:end="5.404063"
+ sodipodi:start="0.79434821"
+ sodipodi:ry="131.49661"
+ sodipodi:rx="131.36298"
+ sodipodi:cy="135.50565"
+ sodipodi:cx="139.38106"
+ sodipodi:type="arc"
+ id="path322"
+ style="fill:#ffff00;stroke:#ffff00;stroke-width:0.264583" />
+ </g>
+ <g
+ inkscape:label="Pencil"
+ id="layer2"
+ inkscape:groupmode="layer">
+ <rect
+ transform="rotate(-32.531264)"
+ y="183.11769"
+ x="88.145966"
+ height="131.49661"
+ width="26.459681"
+ id="rect325"
+ style="fill:#ff2a2a;stroke:#ff2a2a;stroke-width:0.264583" />
+ <rect
+ transform="rotate(-32.531264)"
+ y="182.85042"
+ x="103.64758"
+ height="131.76387"
+ width="10.958076"
+ id="rect327"
+ style="fill:#ff8080;stroke:#ff8080;stroke-width:0.264583" />
+ <path
+ transform="matrix(0.75732312,-0.48304916,0.53419532,0.83750987,8.9202476,79.989091)"
+ inkscape:transform-center-y="0.023902119"
+ inkscape:transform-center-x="-3.2818732"
+ d="m 137.64382,111.4514 7.32147,-12.779681 7.32147,-12.779679 7.4068,12.730421 7.40679,12.730419 -14.72827,0.0493 z"
+ inkscape:randomized="0"
+ inkscape:rounded="0"
+ inkscape:flatsided="false"
+ sodipodi:arg2="3.661847"
+ sodipodi:arg1="2.6146494"
+ sodipodi:r2="8.5034142"
+ sodipodi:r1="17.006828"
+ sodipodi:cy="102.89877"
+ sodipodi:cx="152.34364"
+ sodipodi:sides="3"
+ id="path329"
+ style="fill:#000000;stroke:#999999;stroke-width:0.264583"
+ sodipodi:type="star" />
+ </g>
+</svg>