mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-07 10:52:49 +08:00
add gui video player window close event
This commit is contained in:
18
gui/handler.go
Normal file
18
gui/handler.go
Normal file
@@ -0,0 +1,18 @@
|
||||
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()
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user