Moved the menu to a new structure.
This commit is contained in:
29
internal/gui/menu/main.go
Normal file
29
internal/gui/menu/main.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package menu
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/lang"
|
||||
)
|
||||
|
||||
func MainMenuSettings(
|
||||
actionMainSettings func(),
|
||||
actionFFPathSelection func(),
|
||||
) *fyne.Menu {
|
||||
quit := fyne.NewMenuItem(lang.L("exit"), nil)
|
||||
quit.IsQuit = true
|
||||
|
||||
settingsSelection := fyne.NewMenuItem(lang.L("settings"), actionMainSettings)
|
||||
ffPathSelection := fyne.NewMenuItem(lang.L("changeFFPath"), actionFFPathSelection)
|
||||
|
||||
return fyne.NewMenu(lang.L("settings"), settingsSelection, ffPathSelection, quit)
|
||||
}
|
||||
|
||||
func MainMenuHelp(
|
||||
actionAbout func(),
|
||||
actionHelpFFplay func(),
|
||||
) *fyne.Menu {
|
||||
about := fyne.NewMenuItem(lang.L("about"), actionAbout)
|
||||
helpFFplay := fyne.NewMenuItem(lang.L("helpFFplay"), actionHelpFFplay)
|
||||
|
||||
return fyne.NewMenu(lang.L("help"), helpFFplay, about)
|
||||
}
|
Reference in New Issue
Block a user