mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 06:10:49 +02:00
Try and make rip look nicer
This commit is contained in:
@@ -66,12 +66,27 @@ module.exports = class RipCommand extends Command {
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.font = this.client.fonts.get('CoffinStone.otf').toCanvasString(62);
|
||||
ctx.fillStyle = 'black';
|
||||
ctx.fillText(user.username, 438, 330, 500);
|
||||
ctx.fillStyle = 'white';
|
||||
if (cause) ctx.fillText(cause, 438, 910, 500);
|
||||
this.fillPressedText(ctx, user.username, 438, 330, 500);
|
||||
if (cause) this.fillPressedText(ctx, cause, 438, 910, 500);
|
||||
ctx.font = this.client.fonts.get('CoffinStone.otf').toCanvasString(37);
|
||||
ctx.fillText('In Loving Memory of', 438, 292);
|
||||
this.fillPressedText(ctx, 'In Loving Memory of', 438, 292);
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer('image/png'), name: 'rip.png' }] });
|
||||
}
|
||||
|
||||
fillPressedText(ctx, text, x, y, maxWidth) {
|
||||
ctx.fillStyle = '#555555';
|
||||
ctx.shadowColor = '#222222';
|
||||
ctx.shadowOffsetX = -2;
|
||||
ctx.shadowOffsetY = -2;
|
||||
ctx.shadowBlur = 5;
|
||||
ctx.fillText(text, x, y, maxWidth);
|
||||
ctx.strokeStyle = '#FFFFFF';
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeText(text, x, y, maxWidth);
|
||||
ctx.shadowOffsetX = 2;
|
||||
ctx.shadowOffsetY = 2;
|
||||
ctx.shadowColor = '#999999';
|
||||
ctx.fillText(text, x, y, maxWidth);
|
||||
return ctx;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user