addressed some of the requests
This commit is contained in:
committed by
David Négrier
parent
9e0f43d542
commit
a50f7a7e9b
@@ -62,8 +62,7 @@ export class CustomWokaPreviewer extends Phaser.GameObjects.Container {
|
||||
this.turnIcon = this.scene.add
|
||||
.image(this.background.displayWidth * 0.35, this.background.displayHeight * 0.35, "iconTurn")
|
||||
.setScale(0.25)
|
||||
.setTintFill(0xffffff)
|
||||
.setAlpha(0.5);
|
||||
.setAlpha(0.75);
|
||||
|
||||
this.drawFrame();
|
||||
this.setSize(this.SIZE, this.SIZE);
|
||||
|
||||
@@ -6,6 +6,7 @@ export interface IconButtonConfig {
|
||||
hover: IconButtonAppearanceConfig;
|
||||
pressed: IconButtonAppearanceConfig;
|
||||
selected: IconButtonAppearanceConfig;
|
||||
iconScale?: number;
|
||||
}
|
||||
|
||||
export interface IconButtonAppearanceConfig {
|
||||
@@ -34,7 +35,7 @@ export class IconButton extends Phaser.GameObjects.Container {
|
||||
this.config = config;
|
||||
|
||||
this.background = this.scene.add.graphics();
|
||||
this.icon = this.scene.add.image(0, 0, this.config.iconTextureKey);
|
||||
this.icon = this.scene.add.image(0, 0, this.config.iconTextureKey).setScale(config.iconScale ?? 1);
|
||||
this.drawBackground(this.config.idle);
|
||||
|
||||
this.add([this.background, this.icon]);
|
||||
|
||||
Reference in New Issue
Block a user