View skeleton

This commit is contained in:
Isaac Shoebottom 2024-02-17 00:54:16 -04:00
parent aacee628dc
commit e6c413c020

28
view/view.go Normal file
View File

@ -0,0 +1,28 @@
package view
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
"gofin/audio"
)
import "fyne.io/fyne/v2/app"
var (
view View
)
type View struct {
app fyne.App
mainWindow fyne.Window
}
func CreateView() {
view.app = app.New()
view.mainWindow = view.app.NewWindow("Hello")
}
func PopulateView() {
btn := widget.NewButton("Play", audio.Play)
view.mainWindow.SetContent(btn)
view.mainWindow.ShowAndRun()
}