我想在鼠标悬停在startbtn
上时显示一些文本。请参见下面的JS代码:
this.startBtn = new Button(this.game, this.world.width / 4, this.world.centerY, 'Play', styles.btnLargeMain)
this.startBtn.onmouseover="HeHe"
this.startBtn.onInputUp.add(this.startGame, this)
this.startBtn.position.x = this.world.width / 2 - logo.width / 2 + this.startBtn.width / 2
this.startBtn.position.y = this.world.centerY + this.startBtn.height / 2
styles.btnLargeMain将链接到
btnLargeMain: {
frame: 'yellow',
sheet: 'ui',
bitmap: true,
font: 'kenvector28',
size: 28,
},