mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-21 01:50:36 -07:00
feat: add button
This commit is contained in:
parent
c2e10eda31
commit
0e0e5db7e0
11
main.go
11
main.go
@ -14,6 +14,9 @@ var (
|
||||
dstBox = tview.NewTextView()
|
||||
srcDropDown = tview.NewDropDown()
|
||||
dstDropDown = tview.NewDropDown()
|
||||
langButton = tview.NewButton("(1) Lang")
|
||||
styleButton = tview.NewButton("(2) Style")
|
||||
menuButton = tview.NewButton("(3) Menu")
|
||||
translateWindow = tview.NewFlex()
|
||||
langWindow = tview.NewFlex()
|
||||
mainPage = tview.NewPages()
|
||||
@ -39,6 +42,14 @@ func main() {
|
||||
AddItem(srcDropDown, 32, 1, true).
|
||||
AddItem(dstDropDown, 32, 1, false).
|
||||
AddItem(nil, 0, 1, false), 20, 1, true).
|
||||
AddItem(tview.NewFlex().SetDirection(tview.FlexColumn).
|
||||
AddItem(nil, 0, 1, false).
|
||||
AddItem(langButton, 8, 1, true).
|
||||
AddItem(nil, 20, 1, false).
|
||||
AddItem(styleButton, 9, 1, true).
|
||||
AddItem(nil, 20, 1, false).
|
||||
AddItem(menuButton, 8, 1, true).
|
||||
AddItem(nil, 0, 1, false), 1, 1, true).
|
||||
AddItem(nil, 0, 1, false)
|
||||
|
||||
mainPage.AddPage("translatePage", translateWindow, true, true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user