ppforge/internal/app/app.go

28 lines
502 B
Go
Raw Normal View History

package app
2022-11-23 20:33:07 +01:00
import (
2022-11-24 21:49:10 +01:00
"fyne.io/fyne/v2"
2022-11-23 20:33:07 +01:00
"fyne.io/fyne/v2/app"
2023-05-12 09:10:24 +02:00
"gitea.mmo.to/ppForge/ppforge/internal/ui"
2022-11-23 20:33:07 +01:00
)
var fyneApp fyne.App
var w fyne.Window
2023-05-12 17:18:24 +02:00
// Appmain creates the Fyne application and starts it up
2022-11-23 20:33:07 +01:00
func Appmain() {
fyneApp = app.New()
w = fyneApp.NewWindow("ProtocolPacketForger")
w.Resize(fyne.NewSize(1024, 768))
2022-11-23 20:33:07 +01:00
w.SetContent(CreateApp())
2022-11-23 20:33:07 +01:00
w.ShowAndRun()
}
2022-11-25 11:36:29 +01:00
2023-05-12 17:18:24 +02:00
// CreateApp creates the PPF UI
2022-11-25 11:36:29 +01:00
func CreateApp() *fyne.Container {
2023-01-05 14:16:41 +01:00
ppf := ui.NewPPF(fyneApp, w)
return ppf.GetContainer()
2022-11-25 11:36:29 +01:00
}