new extended bg

This commit is contained in:
ArcaneDisgea 2021-05-28 15:08:35 -04:00
parent 56e3702cab
commit 67a5dd8ff1
3 changed files with 8 additions and 10 deletions

BIN
chara_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 KiB

BIN
chara_top2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

View file

@ -97,7 +97,7 @@ class CardCreator {
var d = new Date(); var d = new Date();
this.copyrightYear = d.getFullYear(); this.copyrightYear = d.getFullYear();
this.bgImage = await loadImage(absolute("./chara.png")); this.bgImage = await loadImage(absolute("./chara_top.png"));
this.imgMinion = await loadImage(absolute("./minion.png")); this.imgMinion = await loadImage(absolute("./minion.png"));
this.imgMount = await loadImage(absolute("./mount.png")); this.imgMount = await loadImage(absolute("./mount.png"));
@ -247,19 +247,17 @@ class CardCreator {
var portrait = await loadImage(data.Character.Portrait); var portrait = await loadImage(data.Character.Portrait);
ctx.drawImage(this.bgImage, -10, 120, 900, 600); ctx.drawImage(this.bgImage, 0, 0, 890, 722);
ctx.drawImage(portrait, 0, 120, 441, 600); ctx.drawImage(portrait, 0, 120, 441, 600);
ctx.strokeStyle = white; ctx.strokeStyle = white;
//This can be removed once background is extended. ctx.fillStyle = black;
ctx.fillStyle = 'rgba(28, 28, 28, 1)';
ctx.beginPath(); ctx.beginPath();
// Name, Title, Server Rect // Name, Title, Server Rect
ctx.fillRect(0, 0, 900, 120); ctx.fillRect(25, 10, 840, 100);
ctx.fillStyle = black;
ctx.drawImage(this.imgJobBg[data.Character.ActiveClassJob.UnlockedState.ID], rectStartX, 2, rectFullWidth, rectHeightRow1); ctx.drawImage(this.imgJobBg[data.Character.ActiveClassJob.UnlockedState.ID], 450, 5, rectFullWidth, 110);
ctx.fillRect(rectStartX, rectStartRow2Y, rectHalfWidth, rectHeightRow2); ctx.fillRect(rectStartX, rectStartRow2Y, rectHalfWidth, rectHeightRow2);
ctx.fillRect(rectStartXHalf, rectStartRow2Y, rectHalfWidth, rectHeightRow2); ctx.fillRect(rectStartXHalf, rectStartRow2Y, rectHalfWidth, rectHeightRow2);
@ -274,7 +272,7 @@ class CardCreator {
ctx.fillStyle = primary; ctx.fillStyle = primary;
if (data.Character.Title.Name !== undefined) if (data.Character.Title.Name !== undefined)
ctx.fillText(data.Character.Title.Name, 450, 30); ctx.fillText(data.Character.Title.Name, 450, 40);
ctx.font = small; ctx.font = small;
ctx.fillText(`${data.Character.Server} (${data.Character.DC})`, 450, 100); ctx.fillText(`${data.Character.Server} (${data.Character.DC})`, 450, 100);
@ -311,9 +309,9 @@ class CardCreator {
ctx.textAlign = "center"; ctx.textAlign = "center";
// Chara Name // Chara Name
if (data.Character.Title === undefined || data.Character.Title.Name == null || data.Character.Title.Name == "") { if (data.Character.Title === undefined || data.Character.Title.Name == null || data.Character.Title.Name == "") {
ctx.fillText(data.Character.Name, 450, 70); ctx.fillText(data.Character.Name, 450, 75);
} else { } else {
ctx.fillText(data.Character.Name, 450, 70); ctx.fillText(data.Character.Name, 450, 75);
} }
// Race, Clan, Guardian, GC, FC Info // Race, Clan, Guardian, GC, FC Info
ctx.font = smed; ctx.font = smed;