re-enable stubbed function for Phaser text styling

This commit is contained in:
ImperialSympathizer 2024-09-12 23:12:48 -04:00
parent 6186e80a1e
commit acc1fa2b4e

View File

@ -17,7 +17,9 @@ export default class MockText implements MockGameObject {
this.scene = textureManager.scene;
this.textureManager = textureManager;
this.style = {};
// Phaser.GameObjects.TextStyle.prototype.setStyle = () => null;
// DO NOT REMOVE: function needs to be stubbed for tests
// @ts-ignore
Phaser.GameObjects.TextStyle.prototype.setStyle = () => this;
// Phaser.GameObjects.Text.prototype.updateText = () => null;
// Phaser.Textures.TextureManager.prototype.addCanvas = () => {};
UI.prototype.showText = this.showText;