WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 8682861

Browse files
committed
Preparing release 1.1.6
2 parents b1d9aa2 + 2987162 commit 8682861

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

build/cardmaker.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tcg/ygo/CardMaker.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ define(["react", "react-class", "./Card", "webfont"], function App(React, ReactC
165165
e("label", null, "Defense and/or Link", e("input", { onChange: this.updateField("card.def"), type: "text", value: this.state.card.def })),
166166
e("label", null, "Set id", e("input", { onChange: this.updateField("card.id"), type: "text", value: this.state.card.id })),
167167
e("label", null, "Serial number", e("input", { onChange: this.updateField("card.serial"), type: "text", value: this.state.card.serial })),
168+
e("button", {onClick: this.randomizeSerialNumber }, "Randomize"),
168169
e("label", null, "Copyright", e("input", { onChange: this.updateField("card.copyright"), type: "text", value: this.state.card.copyright })),
169170

170171

@@ -340,6 +341,14 @@ define(["react", "react-class", "./Card", "webfont"], function App(React, ReactC
340341
fr.readAsDataURL(files[0]);
341342
}
342343
}.bind(this);
344+
},
345+
346+
randomizeSerialNumber: function()
347+
{
348+
var value = "0000000000" + (Math.random() * 10000000000).toFixed(0);
349+
console.log(typeof value);
350+
351+
this.updateField("card.serial")({target:{value: value.substring(value.length-10)}});
343352
}
344353
});
345354
});

src/tcg/ygo/Rarities.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define([], function()
44
return {
55
common: { name: "Common", foil: undefined, color: undefined },
66
rare: { name: "Rare", foil: undefined, color: "silver"},
7-
secret: { name: "Secret rare", foil: [ path, "Secret.png" ].join("/"), color: "silver" }
7+
ultra: { name: "Ultra rare", foil: [ path, "Secret.png" ].join("/"), color: "gold" },
8+
secret: { name: "Secret rare", foil: [ path, "Secret.png" ].join("/"), color: "silver" },
89
};
910
});

src/tcg/ygo/layout/component/CardName.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ define(["react", "react-class", "draw/Text", "../../Rarities"], function CardNam
3232
var colors = {
3333
default: { highlight: { color: "transparent" }, base: { color: "#000"} },
3434
white: { highlight: { color: "transparent" }, base: { color: "#FFF"} },
35-
silver: { highlight: { color: "#FFF" }, base: { color: "#222"} }
35+
silver: { highlight: { color: "#b6b6b6" }, base: { color: "#1e1e1e"} },
36+
gold: { highlight: { color: "#d3b146"}, base: {color: "#4e3518"}}
3637
}
3738

3839
var CardName = ReactClass({
@@ -47,7 +48,7 @@ define(["react", "react-class", "draw/Text", "../../Rarities"], function CardNam
4748
React.createElement(Text,
4849
{
4950
text: this.props.value,
50-
style: Object.assign({}, style, (colors[color] || colors.default).highlight, { top: style.top+1 }),
51+
style: Object.assign({}, style, (colors[color] || colors.default).highlight, { top: style.top-1, left: style.left-1 }),
5152
repaint: this.props.repaint,
5253
canvas: this.props.canvas
5354
}),

0 commit comments

Comments
 (0)