| 123456789101112131415161718192021222324 |
- package ui
- import (
- "github.com/gdamore/tcell/v2"
- "github.com/rigormorrtiss/discordo/util"
- "github.com/rivo/tview"
- )
- func NewMessagesTextView(onMessagesTextViewChanged func(), theme *util.Theme) (messagesTextView *tview.TextView) {
- messagesTextView = tview.NewTextView().
- SetDynamicColors(true).
- SetWrap(true).
- SetWordWrap(true).
- SetScrollable(true).
- ScrollToEnd().
- SetChangedFunc(onMessagesTextViewChanged)
- messagesTextView.
- SetTextColor(tcell.GetColor(theme.TextViewForeground)).
- SetBackgroundColor(tcell.GetColor(theme.TextViewBackground)).
- SetBorder(true).
- SetBorderPadding(0, 0, 1, 1)
- return
- }
|