discordo/ui/message_inputfield.go
2021-12-14 19:25:31 +04:00

19 lines
400 B
Go

package ui
import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
func NewMessageInputField() *tview.InputField {
i := tview.NewInputField()
i.
SetPlaceholder("Message...").
SetPlaceholderTextColor(tcell.ColorWhite).
SetFieldBackgroundColor(tview.Styles.PrimitiveBackgroundColor).
SetTitleAlign(tview.AlignLeft).
SetBorder(true).
SetBorderPadding(0, 0, 1, 0)
return i
}