diff --git a/index.html b/index.html
index 946b9b49..1d05e658 100644
--- a/index.html
+++ b/index.html
@@ -32,6 +32,7 @@
+
diff --git a/stitchcode/assets/turtle-logo.png b/stitchcode/assets/turtle-logo.png
new file mode 100644
index 00000000..bc331b92
Binary files /dev/null and b/stitchcode/assets/turtle-logo.png differ
diff --git a/stitchcode/gui.js b/stitchcode/gui.js
index 308a9a1c..766a9fcb 100644
--- a/stitchcode/gui.js
+++ b/stitchcode/gui.js
@@ -646,6 +646,40 @@ IDE_Morph.prototype.toggleAppMode = function (appMode) {
this.setExtent(this.world().extent()); // resume trackChanges
};
+IDE_Morph.prototype.aboutTurtleStitch = function () {
+ var dlg, aboutTxt, pic, world = this.world();
+
+ pic = Morph.fromImageURL('stitchcode/assets/turtle-logo.png');
+ pic.setExtent(new Point(32, 32));
+
+ aboutTxt = 'TurtleStich! 2.1.0 beta\n\n'
+ + 'Copyright \u24B8 2018 Michael Aschauer\n\n'
+
+ + 'TurtleStitch is developed by OSEDA - Association for\n'
+ + 'Development of Open Source Software in Education, Design\n'
+ + 'and Art and stitchcode.com - Visionary Embroidery.\n\n'
+
+ + 'The project has been sponsored by netidee Open Innovation\n'
+ + '(Internet Foundation Austria) and kickstarter crowdfunding.\n\n'
+
+ + 'TurtleStich is based on Snap!\n\n'
+
+ dlg = new DialogBoxMorph();
+ dlg.inform(localize('About TurtleStitch'), localize(aboutTxt), world, pic);
+
+ btn1 = dlg.addButton(this.aboutSnap,
+ 'About Snap! ...'
+ );
+ btn2 = dlg.addButton(
+ function () {
+ window.open('http://www.turtlestitch.com', 'TurtleStitchWebsite');
+ },
+ 'TurtleStitch! website',
+
+ );
+ dlg.fixLayout();
+};
+
// create status display (inspired by beetleblocks)
IDE_Morph.prototype.createStatusDisplay = function () {
var frame,
@@ -1767,7 +1801,9 @@ IDE_Morph.prototype.snapMenu = function () {
world = this.world();
menu = new MenuMorph(this);
- menu.addItem('About...', 'aboutSnap');
+ menu.addItem('About TurtleStitch ...', 'aboutTurtleStitch');
+ menu.addItem('About Snap! ...', 'aboutSnap');
+
menu.addLine();
menu.addItem(
'Reference manual',
@@ -1776,9 +1812,9 @@ IDE_Morph.prototype.snapMenu = function () {
}
);
menu.addItem(
- 'TurtleStich! website',
+ 'TurtleStitch! website',
function () {
- window.open('http://'+window.location.hostname, 'SnapWebsite');
+ window.open('http://www.turtlestitch.com', 'TurtleStitchWebsite');
}
);
menu.addItem(
diff --git a/stitchcode/morphic.js b/stitchcode/morphic.js
new file mode 100644
index 00000000..3488b0d7
--- /dev/null
+++ b/stitchcode/morphic.js
@@ -0,0 +1,31 @@
+Morph.fromImageURL = function(url) {
+ var m = new Morph();
+
+ m.texture = url;
+
+ m.drawNew = function() {
+ this.image = newCanvas(this.extent());
+ var context = this.image.getContext('2d');
+ context.fillStyle = 'rgba(0,0,0,0)';
+ context.fillRect(0, 0, this.width(), this.height());
+ if (this.texture) {
+ this.drawTexture(this.texture);
+ }
+ }
+
+ m.drawCachedTexture = function () {
+ var context = this.image.getContext('2d');
+ context.drawImage(
+ this.cachedTexture,
+ 0,
+ Math.round((this.height() - this.cachedTexture.height) / 2)
+ );
+ this.changed();
+ };
+
+ m.drawNew();
+
+ m.setExtent(new Point(m.cachedTexture.width, m.cachedTexture.height));
+
+ return m;
+}
diff --git a/stitchcode/turtleShepherd.js b/stitchcode/turtleShepherd.js
index 1a522172..4d34d14b 100644
--- a/stitchcode/turtleShepherd.js
+++ b/stitchcode/turtleShepherd.js
@@ -694,11 +694,11 @@ TurtleShepherd.prototype.toDST = function() {
}
for (i=0; i < this.cache.length; i++) {
-
+
if (this.cache[i].cmd == "color") {
expArr.push(0x00);
expArr.push(0x00);
- expArr.push(0x43);
+ expArr.push(0xC3);
encodeTajimaStitch(0,0,false);
} else if (this.cache[i].cmd == "move") {