-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
76 lines (59 loc) · 1.94 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package main
import (
"flag"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
"fyne.io/fyne/v2"
)
const (
RES240 = "240p"
RES360 = "360p"
RES480 = "480p"
RES720 = "720p"
CONFIG_FILE = ".meeting-media"
WM = "WM"
MM = "MM"
)
func main() {
config := NewConfig()
a := app.NewWithID("AttendantZoom")
icon, err := fyne.LoadResourceFromPath("icon.png")
if err != nil {
}
config.DebugMode = flag.Bool("d", false, "descarga falsa; imprimir información de depuración")
flag.Parse()
if *config.DebugMode {
logrus.SetLevel(logrus.DebugLevel)
logrus.Debug("FUNCIONANDO EN MODO DE DEPURACIÓN")
}
progressBar := widget.NewProgressBar()
config.Progress = &progress{0, "", progressBar}
pbFormatter := func() string { return config.Progress.Title }
config.Progress.ProgressBar.TextFormatter = pbFormatter
mediaviewerv := a.NewWindow("Attendant Zoom")
mediaviewerv.Resize(fyne.NewSize(640, 360))
mediaviewerv.SetIcon(icon)
backgroundImage := canvas.NewImageFromFile("resources/yeartext.png")
backgroundImage.Resize(fyne.NewSize(640, 360))
containerv := container.NewMax(backgroundImage)
containerv.Resize(fyne.NewSize(640, 360))
mediaviewerv.SetContent(containerv)
settingsTab := container.NewTabItem("", config.settingsGUI())
settingsTab.Icon = theme.SettingsIcon()
downloadedFilesTab := container.NewTabItem("Reunión", config.createDownloadedFilesView(mediaviewerv))
tabs := container.NewAppTabs(
downloadedFilesTab,
container.NewTabItem("Vida y Ministerio", config.mGUI(MM)),
container.NewTabItem("Estudio de La Atalaya", config.mGUI(WM)),
settingsTab,
)
w := a.NewWindow("Attendant Zoom")
w.SetContent(container.NewVBox(tabs))
w.SetIcon(icon)
mediaviewerv.Show()
w.ShowAndRun()
}