mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 18:32:50 +08:00
19 lines
411 B
Go
19 lines
411 B
Go
package gui
|
|
|
|
import (
|
|
"AynaLivePlayer/core/events"
|
|
"AynaLivePlayer/global"
|
|
"AynaLivePlayer/pkg/event"
|
|
)
|
|
|
|
func registerHandlers() {
|
|
global.EventManager.RegisterA(events.GUISetPlayerWindowOpenCmd, "gui.player.videoplayer.handleopen", func(event *event.Event) {
|
|
data := event.Data.(events.GUISetPlayerWindowOpenCmdEvent)
|
|
if data.SetOpen {
|
|
playerWindow.Close()
|
|
} else {
|
|
showPlayerWindow()
|
|
}
|
|
})
|
|
}
|