gui refactor

This commit is contained in:
aynakeya
2025-10-06 23:52:10 +08:00
parent 7c3f8587f6
commit 5c508b9664
61 changed files with 1448 additions and 618 deletions

View File

@@ -0,0 +1,19 @@
package player
import (
"AynaLivePlayer/core/events"
"AynaLivePlayer/global"
"AynaLivePlayer/gui/gctx"
"AynaLivePlayer/pkg/eventbus"
)
func registerHandlers() {
global.EventBus.Subscribe(gctx.EventChannel, events.GUISetPlayerWindowOpenCmd, "gui.player.videoplayer.handleopen", func(event *eventbus.Event) {
data := event.Data.(events.GUISetPlayerWindowOpenCmdEvent)
if data.SetOpen {
playerWindow.Close()
} else {
showPlayerWindow()
}
})
}