Skip to main content

hover 进入鼠标悬停状态

hover

类型: MethodDeclaration

所属类: ButtonElement

定义位置: ui.ts

描述

进入鼠标悬停状态

参数 se: 是否播放选中音效

参数

参数名类型描述默认值
seboolean-false

返回值

类型: void

源代码

位置: 第 5014 行

public hover(se: boolean = false): void {
if (this.state !== 'hover') {
if (!this.selected) {
this.selected = true
this.emit('select')
}
this.state = 'hover'
this.updateDisplayMode(se)
if (!(Input.event instanceof ScriptMouseEvent) &&
this.parent instanceof WindowElement) {
this.parent.scrollToChild(this)
}
}
}

文档生成时间:2025/7/7 12:07:07