mirror of https://github.com/miguelmota/cointop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
369 B
Go
15 lines
369 B
Go
package cointop
|
|
|
|
// SetActiveView sets the active view
|
|
func (ct *Cointop) SetActiveView(v string) error {
|
|
ct.g.SetViewOnTop(v)
|
|
ct.g.SetCurrentView(v)
|
|
if v == ct.Views.SearchField.Name() {
|
|
ct.Views.SearchField.SetCursor(1, 0)
|
|
ct.Views.SearchField.Update("/")
|
|
} else if v == ct.Views.Table.Name() {
|
|
ct.g.SetViewOnTop(ct.Views.Statusbar.Name())
|
|
}
|
|
return nil
|
|
}
|