mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-19 01:00:20 -07:00
style: rename function & reorder function call
- rename function `translatePageHandler` to `translateWindow` - reorder function call in `ui.go`, let function call jointed - change the position of comment
This commit is contained in:
parent
94ec8498ac
commit
10c6877230
@ -24,7 +24,7 @@ func configInit() {
|
|||||||
}
|
}
|
||||||
config.AddConfigPath("$HOME/.config/gtt")
|
config.AddConfigPath("$HOME/.config/gtt")
|
||||||
|
|
||||||
// create config file if not exists
|
// Create config file if not exists
|
||||||
if err := config.ReadInConfig(); err != nil {
|
if err := config.ReadInConfig(); err != nil {
|
||||||
config.Set("transparent", false)
|
config.Set("transparent", false)
|
||||||
config.Set("theme", "Gruvbox")
|
config.Set("theme", "Gruvbox")
|
||||||
|
@ -30,9 +30,8 @@ func NewTranslator() *Translator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Translator) Translate(message string) (string, error) {
|
func (t *Translator) Translate(message string) (translation string, err error) {
|
||||||
var data []interface{}
|
var data []interface{}
|
||||||
var translated string
|
|
||||||
|
|
||||||
urlStr := fmt.Sprintf(
|
urlStr := fmt.Sprintf(
|
||||||
textURL,
|
textURL,
|
||||||
@ -54,12 +53,11 @@ func (t *Translator) Translate(message string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
result := data[0]
|
for _, lines := range data[0].([]interface{}) {
|
||||||
for _, lines := range result.([]interface{}) {
|
|
||||||
translatedLine := lines.([]interface{})[0]
|
translatedLine := lines.([]interface{})[0]
|
||||||
translated += fmt.Sprintf("%v", translatedLine)
|
translation += fmt.Sprintf("%v", translatedLine)
|
||||||
}
|
}
|
||||||
return translated, nil
|
return translation, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", errors.New("Translation not found")
|
return "", errors.New("Translation not found")
|
||||||
|
8
main.go
8
main.go
@ -43,10 +43,10 @@ func main() {
|
|||||||
configInit()
|
configInit()
|
||||||
uiInit()
|
uiInit()
|
||||||
|
|
||||||
mainPage.AddPage("translatePage", translateWindow, true, true)
|
mainPage.AddPage("translateWindow", translateWindow, true, true)
|
||||||
mainPage.AddPage("langPage", langWindow, true, false)
|
mainPage.AddPage("langWindow", langWindow, true, false)
|
||||||
mainPage.AddPage("stylePage", styleWindow, true, false)
|
mainPage.AddPage("styleWindow", styleWindow, true, false)
|
||||||
mainPage.AddPage("keyMapPage", keyMapWindow, true, false)
|
mainPage.AddPage("keyMapWindow", keyMapWindow, true, false)
|
||||||
|
|
||||||
if err := app.SetRoot(mainPage, true).
|
if err := app.SetRoot(mainPage, true).
|
||||||
EnableMouse(true).Run(); err != nil {
|
EnableMouse(true).Run(); err != nil {
|
||||||
|
140
ui.go
140
ui.go
@ -43,55 +43,55 @@ const (
|
|||||||
|
|
||||||
func updateBackgroundColor() {
|
func updateBackgroundColor() {
|
||||||
// input/output
|
// input/output
|
||||||
srcInput.SetBackgroundColor(style.BackgroundColor())
|
|
||||||
srcInput.SetTextStyle(tcell.StyleDefault.
|
srcInput.SetTextStyle(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()))
|
Foreground(style.ForegroundColor())).
|
||||||
|
SetBackgroundColor(style.BackgroundColor())
|
||||||
dstOutput.SetBackgroundColor(style.BackgroundColor())
|
dstOutput.SetBackgroundColor(style.BackgroundColor())
|
||||||
|
|
||||||
// dropdown
|
// dropdown
|
||||||
srcLangDropDown.SetBackgroundColor(style.BackgroundColor())
|
|
||||||
srcLangDropDown.SetListStyles(tcell.StyleDefault.
|
srcLangDropDown.SetListStyles(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()),
|
Foreground(style.ForegroundColor()),
|
||||||
tcell.StyleDefault.
|
tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.PrefixColor()))
|
Foreground(style.PrefixColor())).
|
||||||
dstLangDropDown.SetBackgroundColor(style.BackgroundColor())
|
SetBackgroundColor(style.BackgroundColor())
|
||||||
dstLangDropDown.SetListStyles(tcell.StyleDefault.
|
dstLangDropDown.SetListStyles(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()),
|
Foreground(style.ForegroundColor()),
|
||||||
tcell.StyleDefault.
|
tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.PrefixColor()))
|
Foreground(style.PrefixColor())).
|
||||||
themeDropDown.SetBackgroundColor(style.BackgroundColor())
|
SetBackgroundColor(style.BackgroundColor())
|
||||||
themeDropDown.SetListStyles(tcell.StyleDefault.
|
themeDropDown.SetListStyles(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()),
|
Foreground(style.ForegroundColor()),
|
||||||
tcell.StyleDefault.
|
tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.PrefixColor()))
|
Foreground(style.PrefixColor())).
|
||||||
transparentDropDown.SetBackgroundColor(style.BackgroundColor())
|
SetBackgroundColor(style.BackgroundColor())
|
||||||
transparentDropDown.SetListStyles(tcell.StyleDefault.
|
transparentDropDown.SetListStyles(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()),
|
Foreground(style.ForegroundColor()),
|
||||||
tcell.StyleDefault.
|
tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.PrefixColor()))
|
Foreground(style.PrefixColor())).
|
||||||
srcBorderDropDown.SetBackgroundColor(style.BackgroundColor())
|
SetBackgroundColor(style.BackgroundColor())
|
||||||
srcBorderDropDown.SetListStyles(tcell.StyleDefault.
|
srcBorderDropDown.SetListStyles(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()),
|
Foreground(style.ForegroundColor()),
|
||||||
tcell.StyleDefault.
|
tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.PrefixColor()))
|
Foreground(style.PrefixColor())).
|
||||||
dstBorderDropDown.SetBackgroundColor(style.BackgroundColor())
|
SetBackgroundColor(style.BackgroundColor())
|
||||||
dstBorderDropDown.SetListStyles(tcell.StyleDefault.
|
dstBorderDropDown.SetListStyles(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()),
|
Foreground(style.ForegroundColor()),
|
||||||
tcell.StyleDefault.
|
tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.PrefixColor()))
|
Foreground(style.PrefixColor())).
|
||||||
|
SetBackgroundColor(style.BackgroundColor())
|
||||||
|
|
||||||
// key map
|
// key map
|
||||||
keyMapMenu.SetBackgroundColor(style.BackgroundColor())
|
keyMapMenu.SetBackgroundColor(style.BackgroundColor())
|
||||||
@ -129,20 +129,20 @@ func updateNonConfigColor() {
|
|||||||
dstLangDropDown.SetFieldBackgroundColor(style.SelectedColor()).
|
dstLangDropDown.SetFieldBackgroundColor(style.SelectedColor()).
|
||||||
SetFieldTextColor(style.ForegroundColor()).
|
SetFieldTextColor(style.ForegroundColor()).
|
||||||
SetPrefixTextColor(style.PrefixColor())
|
SetPrefixTextColor(style.PrefixColor())
|
||||||
themeDropDown.SetLabelColor(style.LabelColor())
|
themeDropDown.SetLabelColor(style.LabelColor()).
|
||||||
themeDropDown.SetFieldBackgroundColor(style.SelectedColor()).
|
SetFieldBackgroundColor(style.SelectedColor()).
|
||||||
SetFieldTextColor(style.ForegroundColor()).
|
SetFieldTextColor(style.ForegroundColor()).
|
||||||
SetPrefixTextColor(style.PrefixColor())
|
SetPrefixTextColor(style.PrefixColor())
|
||||||
transparentDropDown.SetLabelColor(style.LabelColor())
|
transparentDropDown.SetLabelColor(style.LabelColor()).
|
||||||
transparentDropDown.SetFieldBackgroundColor(style.SelectedColor()).
|
SetFieldBackgroundColor(style.SelectedColor()).
|
||||||
SetFieldTextColor(style.ForegroundColor()).
|
SetFieldTextColor(style.ForegroundColor()).
|
||||||
SetPrefixTextColor(style.PrefixColor())
|
SetPrefixTextColor(style.PrefixColor())
|
||||||
srcBorderDropDown.SetLabelColor(style.LabelColor())
|
srcBorderDropDown.SetLabelColor(style.LabelColor()).
|
||||||
srcBorderDropDown.SetFieldBackgroundColor(style.SelectedColor()).
|
SetFieldBackgroundColor(style.SelectedColor()).
|
||||||
SetFieldTextColor(style.ForegroundColor()).
|
SetFieldTextColor(style.ForegroundColor()).
|
||||||
SetPrefixTextColor(style.PrefixColor())
|
SetPrefixTextColor(style.PrefixColor())
|
||||||
dstBorderDropDown.SetLabelColor(style.LabelColor())
|
dstBorderDropDown.SetLabelColor(style.LabelColor()).
|
||||||
dstBorderDropDown.SetFieldBackgroundColor(style.SelectedColor()).
|
SetFieldBackgroundColor(style.SelectedColor()).
|
||||||
SetFieldTextColor(style.ForegroundColor()).
|
SetFieldTextColor(style.ForegroundColor()).
|
||||||
SetPrefixTextColor(style.PrefixColor())
|
SetPrefixTextColor(style.PrefixColor())
|
||||||
|
|
||||||
@ -179,10 +179,14 @@ func updateAllColor() {
|
|||||||
func updateTitle() {
|
func updateTitle() {
|
||||||
srcInput.SetTitle(translator.SrcLang)
|
srcInput.SetTitle(translator.SrcLang)
|
||||||
dstOutput.SetTitle(translator.DstLang)
|
dstOutput.SetTitle(translator.DstLang)
|
||||||
srcLangDropDown.SetCurrentOption(IndexOf(translator.SrcLang, translate.Lang))
|
srcLangDropDown.SetCurrentOption(
|
||||||
srcLangDropDown.SetTitle(translator.SrcLang)
|
IndexOf(translator.SrcLang,
|
||||||
dstLangDropDown.SetCurrentOption(IndexOf(translator.DstLang, translate.Lang))
|
translate.Lang)).
|
||||||
dstLangDropDown.SetTitle(translator.DstLang)
|
SetTitle(translator.SrcLang)
|
||||||
|
dstLangDropDown.SetCurrentOption(
|
||||||
|
IndexOf(translator.DstLang,
|
||||||
|
translate.Lang)).
|
||||||
|
SetTitle(translator.DstLang)
|
||||||
}
|
}
|
||||||
|
|
||||||
func attachButton() *tview.Flex {
|
func attachButton() *tview.Flex {
|
||||||
@ -202,10 +206,10 @@ func uiInit() {
|
|||||||
dstOutput.SetBorder(true)
|
dstOutput.SetBorder(true)
|
||||||
|
|
||||||
// dropdown
|
// dropdown
|
||||||
srcLangDropDown.SetBorder(true)
|
srcLangDropDown.SetOptions(translate.Lang, nil).
|
||||||
srcLangDropDown.SetOptions(translate.Lang, nil)
|
SetBorder(true)
|
||||||
dstLangDropDown.SetBorder(true)
|
dstLangDropDown.SetOptions(translate.Lang, nil).
|
||||||
dstLangDropDown.SetOptions(translate.Lang, nil)
|
SetBorder(true)
|
||||||
themeDropDown.SetLabel("Theme: ").
|
themeDropDown.SetLabel("Theme: ").
|
||||||
SetOptions(color.AllTheme, nil).
|
SetOptions(color.AllTheme, nil).
|
||||||
SetCurrentOption(IndexOf(style.Theme, color.AllTheme))
|
SetCurrentOption(IndexOf(style.Theme, color.AllTheme))
|
||||||
@ -216,19 +220,25 @@ func uiInit() {
|
|||||||
[]string{"true", "false"}))
|
[]string{"true", "false"}))
|
||||||
srcBorderDropDown.SetLabel("Border Color: ").
|
srcBorderDropDown.SetLabel("Border Color: ").
|
||||||
SetOptions(color.Palette, nil).
|
SetOptions(color.Palette, nil).
|
||||||
SetCurrentOption(IndexOf(style.SrcBorderStr(), color.Palette))
|
SetCurrentOption(
|
||||||
srcBorderDropDown.SetBorder(true).
|
IndexOf(style.SrcBorderStr(),
|
||||||
|
color.Palette)).
|
||||||
|
SetBorder(true).
|
||||||
SetTitle("Source")
|
SetTitle("Source")
|
||||||
dstBorderDropDown.SetLabel("Border Color: ").
|
dstBorderDropDown.SetLabel("Border Color: ").
|
||||||
SetOptions(color.Palette, nil).
|
SetOptions(color.Palette, nil).
|
||||||
SetCurrentOption(IndexOf(style.DstBorderStr(), color.Palette))
|
SetCurrentOption(
|
||||||
dstBorderDropDown.SetBorder(true).
|
IndexOf(style.DstBorderStr(),
|
||||||
|
color.Palette)).
|
||||||
|
SetBorder(true).
|
||||||
SetTitle("Destination")
|
SetTitle("Destination")
|
||||||
|
|
||||||
// key map
|
// key map
|
||||||
keyMapMenu.SetBorder(true).
|
keyMapMenu.SetDynamicColors(true).
|
||||||
|
SetText(fmt.Sprintf(keyMapText,
|
||||||
|
fmt.Sprintf("%.6x", style.HighLightColor().TrueColor().Hex()))).
|
||||||
|
SetBorder(true).
|
||||||
SetTitle("Key Map")
|
SetTitle("Key Map")
|
||||||
keyMapMenu.SetDynamicColors(true)
|
|
||||||
|
|
||||||
// window
|
// window
|
||||||
translateWindow.SetDirection(tview.FlexColumn).
|
translateWindow.SetDirection(tview.FlexColumn).
|
||||||
@ -281,7 +291,7 @@ func uiInit() {
|
|||||||
|
|
||||||
// handler
|
// handler
|
||||||
mainPage.SetInputCapture(mainPageHandler)
|
mainPage.SetInputCapture(mainPageHandler)
|
||||||
translateWindow.SetInputCapture(translatePageHandler)
|
translateWindow.SetInputCapture(translateWindowHandler)
|
||||||
langWindow.SetInputCapture(popOutWindowHandler)
|
langWindow.SetInputCapture(popOutWindowHandler)
|
||||||
styleWindow.SetInputCapture(popOutWindowHandler)
|
styleWindow.SetInputCapture(popOutWindowHandler)
|
||||||
keyMapWindow.SetInputCapture(popOutWindowHandler)
|
keyMapWindow.SetInputCapture(popOutWindowHandler)
|
||||||
@ -320,25 +330,25 @@ func uiInit() {
|
|||||||
keyMapMenu.SetDoneFunc(func(key tcell.Key) {
|
keyMapMenu.SetDoneFunc(func(key tcell.Key) {
|
||||||
switch key {
|
switch key {
|
||||||
case tcell.KeyEsc:
|
case tcell.KeyEsc:
|
||||||
mainPage.HidePage("keyMapPage")
|
mainPage.HidePage("keyMapWindow")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
langButton.SetSelectedFunc(func() {
|
langButton.SetSelectedFunc(func() {
|
||||||
mainPage.HidePage("stylePage")
|
mainPage.HidePage("styleWindow")
|
||||||
mainPage.HidePage("keyMapPage")
|
mainPage.HidePage("keyMapWindow")
|
||||||
mainPage.ShowPage("langPage")
|
mainPage.ShowPage("langWindow")
|
||||||
app.SetFocus(langCycle.GetCurrentUI())
|
app.SetFocus(langCycle.GetCurrentUI())
|
||||||
})
|
})
|
||||||
styleButton.SetSelectedFunc(func() {
|
styleButton.SetSelectedFunc(func() {
|
||||||
mainPage.HidePage("langPage")
|
mainPage.HidePage("langWindow")
|
||||||
mainPage.HidePage("keyMapPage")
|
mainPage.HidePage("keyMapWindow")
|
||||||
mainPage.ShowPage("stylePage")
|
mainPage.ShowPage("styleWindow")
|
||||||
app.SetFocus(styleCycle.GetCurrentUI())
|
app.SetFocus(styleCycle.GetCurrentUI())
|
||||||
})
|
})
|
||||||
keyMapButton.SetSelectedFunc(func() {
|
keyMapButton.SetSelectedFunc(func() {
|
||||||
mainPage.HidePage("langPage")
|
mainPage.HidePage("langWindow")
|
||||||
mainPage.HidePage("stylePage")
|
mainPage.HidePage("styleWindow")
|
||||||
mainPage.ShowPage("keyMapPage")
|
mainPage.ShowPage("keyMapWindow")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,22 +368,22 @@ func mainPageHandler(event *tcell.EventKey) *tcell.EventKey {
|
|||||||
return event
|
return event
|
||||||
}
|
}
|
||||||
|
|
||||||
func translatePageHandler(event *tcell.EventKey) *tcell.EventKey {
|
func translateWindowHandler(event *tcell.EventKey) *tcell.EventKey {
|
||||||
key := event.Key()
|
key := event.Key()
|
||||||
|
|
||||||
switch key {
|
switch key {
|
||||||
case tcell.KeyEsc:
|
case tcell.KeyEsc:
|
||||||
mainPage.ShowPage("langPage")
|
mainPage.ShowPage("langWindow")
|
||||||
app.SetFocus(langCycle.GetCurrentUI())
|
app.SetFocus(langCycle.GetCurrentUI())
|
||||||
case tcell.KeyCtrlJ:
|
case tcell.KeyCtrlJ:
|
||||||
message := srcInput.GetText()
|
message := srcInput.GetText()
|
||||||
|
// Only translate when message exist
|
||||||
if len(message) > 0 {
|
if len(message) > 0 {
|
||||||
// Only translate when message exist
|
translation, err := translator.Translate(message)
|
||||||
result, err := translator.Translate(message)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dstOutput.SetText(err.Error())
|
dstOutput.SetText(err.Error())
|
||||||
} else {
|
} else {
|
||||||
dstOutput.SetText(result)
|
dstOutput.SetText(translation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case tcell.KeyCtrlQ:
|
case tcell.KeyCtrlQ:
|
||||||
@ -418,8 +428,8 @@ func translatePageHandler(event *tcell.EventKey) *tcell.EventKey {
|
|||||||
// Play source sound
|
// Play source sound
|
||||||
if translator.SoundLock.Available() {
|
if translator.SoundLock.Available() {
|
||||||
message := srcInput.GetText()
|
message := srcInput.GetText()
|
||||||
|
// Only play when message exist
|
||||||
if len(message) > 0 {
|
if len(message) > 0 {
|
||||||
// Only play when message exist
|
|
||||||
translator.SoundLock.Acquire()
|
translator.SoundLock.Acquire()
|
||||||
go func() {
|
go func() {
|
||||||
err := translator.PlaySound(translator.SrcLang, message)
|
err := translator.PlaySound(translator.SrcLang, message)
|
||||||
@ -434,8 +444,8 @@ func translatePageHandler(event *tcell.EventKey) *tcell.EventKey {
|
|||||||
// Play destination sound
|
// Play destination sound
|
||||||
if translator.SoundLock.Available() {
|
if translator.SoundLock.Available() {
|
||||||
message := dstOutput.GetText(false)
|
message := dstOutput.GetText(false)
|
||||||
|
// Only play when message exist
|
||||||
if len(message) > 0 {
|
if len(message) > 0 {
|
||||||
// Only play when message exist
|
|
||||||
translator.SoundLock.Acquire()
|
translator.SoundLock.Acquire()
|
||||||
go func() {
|
go func() {
|
||||||
err := translator.PlaySound(translator.DstLang, message)
|
err := translator.PlaySound(translator.DstLang, message)
|
||||||
@ -458,19 +468,19 @@ func popOutWindowHandler(event *tcell.EventKey) *tcell.EventKey {
|
|||||||
|
|
||||||
switch ch {
|
switch ch {
|
||||||
case '1':
|
case '1':
|
||||||
mainPage.HidePage("stylePage")
|
mainPage.HidePage("styleWindow")
|
||||||
mainPage.HidePage("keyMapPage")
|
mainPage.HidePage("keyMapWindow")
|
||||||
mainPage.ShowPage("langPage")
|
mainPage.ShowPage("langWindow")
|
||||||
app.SetFocus(langCycle.GetCurrentUI())
|
app.SetFocus(langCycle.GetCurrentUI())
|
||||||
case '2':
|
case '2':
|
||||||
mainPage.HidePage("langPage")
|
mainPage.HidePage("langWindow")
|
||||||
mainPage.HidePage("keyMapPage")
|
mainPage.HidePage("keyMapWindow")
|
||||||
mainPage.ShowPage("stylePage")
|
mainPage.ShowPage("styleWindow")
|
||||||
app.SetFocus(styleCycle.GetCurrentUI())
|
app.SetFocus(styleCycle.GetCurrentUI())
|
||||||
case '3':
|
case '3':
|
||||||
mainPage.HidePage("langPage")
|
mainPage.HidePage("langWindow")
|
||||||
mainPage.HidePage("stylePage")
|
mainPage.HidePage("styleWindow")
|
||||||
mainPage.ShowPage("keyMapPage")
|
mainPage.ShowPage("keyMapWindow")
|
||||||
}
|
}
|
||||||
|
|
||||||
return event
|
return event
|
||||||
@ -485,7 +495,7 @@ func langDropDownHandler(key tcell.Key) {
|
|||||||
langCycle.Decrease()
|
langCycle.Decrease()
|
||||||
app.SetFocus(langCycle.GetCurrentUI())
|
app.SetFocus(langCycle.GetCurrentUI())
|
||||||
case tcell.KeyEsc:
|
case tcell.KeyEsc:
|
||||||
mainPage.HidePage("langPage")
|
mainPage.HidePage("langWindow")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,6 +508,6 @@ func styleDropDownHandler(key tcell.Key) {
|
|||||||
styleCycle.Decrease()
|
styleCycle.Decrease()
|
||||||
app.SetFocus(styleCycle.GetCurrentUI())
|
app.SetFocus(styleCycle.GetCurrentUI())
|
||||||
case tcell.KeyEsc:
|
case tcell.KeyEsc:
|
||||||
mainPage.HidePage("stylePage")
|
mainPage.HidePage("styleWindow")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user