Add speechbubble alpha option

This commit is contained in:
Essem 2022-06-07 16:27:47 -05:00
parent 4f66bc51cd
commit f47a18495d
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
3 changed files with 81 additions and 35 deletions

View file

@ -1,12 +1,25 @@
import ImageCommand from "../../classes/imageCommand.js";
class SpeechBubbleCommand extends ImageCommand {
params = {
water: "assets/images/speechbubble.png",
gravity: "north",
resize: true,
yscale: 0.2,
};
params() {
return {
water: this.specialArgs.alpha ? "assets/images/speech.png" : "assets/images/speechbubble.png",
gravity: "north",
resize: true,
yscale: 0.2,
alpha: this.specialArgs.alpha
};
}
static init() {
super.init();
this.flags.push({
name: "alpha",
description: "Make the top of the speech bubble transparent",
type: 5
});
return this;
}
static description = "Adds a speech bubble to an image";
static aliases = ["speech", "sb"];