View skeleton
This commit is contained in:
parent
aacee628dc
commit
e6c413c020
28
view/view.go
Normal file
28
view/view.go
Normal 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()
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user