Версия 1.0.0 #11
98
internal/gui/view/help_ffplay.go
Normal file
98
internal/gui/view/help_ffplay.go
Normal file
@ -0,0 +1,98 @@
|
||||
package view
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/lang"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func HelpFFplay() fyne.CanvasObject {
|
||||
data := [][]string{
|
||||
[]string{
|
||||
lang.L("helpFFplayKeys"),
|
||||
lang.L("helpFFplayDescription"),
|
||||
},
|
||||
[]string{
|
||||
"Q, ESC",
|
||||
lang.L("helpFFplayQuit"),
|
||||
},
|
||||
[]string{
|
||||
"F, " + lang.L("helpFFplayDoubleClickLeftMouseButton"),
|
||||
lang.L("helpFFplayToggleFullScreen"),
|
||||
},
|
||||
[]string{
|
||||
"P, " + lang.L("helpFFplayKeySpace"),
|
||||
lang.L("helpFFplayPause"),
|
||||
},
|
||||
[]string{
|
||||
"M",
|
||||
lang.L("helpFFplayToggleMute"),
|
||||
},
|
||||
[]string{
|
||||
"9, /",
|
||||
lang.L("helpFFplayDecreaseVolume"),
|
||||
},
|
||||
[]string{
|
||||
"0, *",
|
||||
lang.L("helpFFplayIncreaseVolume"),
|
||||
},
|
||||
[]string{
|
||||
lang.L("helpFFplayKeyLeft"),
|
||||
lang.L("helpFFplaySeekBackward10Seconds"),
|
||||
},
|
||||
[]string{
|
||||
lang.L("helpFFplayKeyRight"),
|
||||
lang.L("helpFFplaySeekForward10Seconds"),
|
||||
},
|
||||
[]string{
|
||||
lang.L("helpFFplayKeyDown"),
|
||||
lang.L("helpFFplaySeekBackward1Minute"),
|
||||
},
|
||||
[]string{
|
||||
lang.L("helpFFplayKeyUp"),
|
||||
lang.L("helpFFplaySeekBForward1Minute"),
|
||||
},
|
||||
[]string{
|
||||
"Page Down",
|
||||
lang.L("helpFFplaySeekBackward10Minutes"),
|
||||
},
|
||||
[]string{
|
||||
"Page Up",
|
||||
lang.L("helpFFplaySeekBForward10Minutes"),
|
||||
},
|
||||
[]string{
|
||||
"S, " + lang.L("helpFFplayKeyHoldS"),
|
||||
lang.L("helpFFplayActivateFrameStepMode"),
|
||||
},
|
||||
[]string{
|
||||
"W",
|
||||
lang.L("helpFFplayCycleVideoFiltersOrShowModes"),
|
||||
},
|
||||
}
|
||||
|
||||
list := widget.NewTable(
|
||||
func() (int, int) {
|
||||
return len(data), len(data[0])
|
||||
},
|
||||
func() fyne.CanvasObject {
|
||||
return widget.NewLabel("")
|
||||
},
|
||||
func(i widget.TableCellID, o fyne.CanvasObject) {
|
||||
if i.Row == 0 {
|
||||
o.(*widget.Label).TextStyle.Bold = true
|
||||
o.(*widget.Label).SizeName = theme.SizeNameSubHeadingText
|
||||
}
|
||||
if i.Col == 0 {
|
||||
o.(*widget.Label).TextStyle.Bold = true
|
||||
}
|
||||
o.(*widget.Label).SetText(data[i.Row][i.Col])
|
||||
})
|
||||
list.SetRowHeight(0, 40)
|
||||
list.SetColumnWidth(0, 200)
|
||||
list.SetColumnWidth(1, 585)
|
||||
list.SetRowHeight(2, 55)
|
||||
|
||||
return container.NewScroll(list)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user