Skip to content

Commit

Permalink
navajowhite, you know #ffdead
Browse files Browse the repository at this point in the history
  • Loading branch information
bahner committed Feb 22, 2024
1 parent d5dee96 commit 7d5107f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// func (ui *ChatUI) displayChatMessage(cm *msg.Message) {
func (ui *ChatUI) displayChatMessage(cm *msg.Message) {
from := alias.GetOrCreateEntityAlias(cm.From)
prompt := withColor("orange", fmt.Sprintf("<%s>:", from))
prompt := withColor("black", fmt.Sprintf("<%s>:", from))
fmt.Fprintf(ui.msgW, "%s %s\n", prompt, string(cm.Content))
}

Expand Down
2 changes: 1 addition & 1 deletion ui/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func (ui *ChatUI) setupInputField() *tview.InputField {
inputField := tview.NewInputField().
SetLabel(viper.GetString("actor.nick") + ": ").
SetFieldWidth(0).
SetFieldBackgroundColor(tcell.ColorBlack)
SetLabelColor(tcell.ColorBlack)

inputField.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
switch event.Key() {
Expand Down
7 changes: 7 additions & 0 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/bahner/go-ma-actor/entity/actor"
"github.com/bahner/go-ma-actor/p2p"
"github.com/bahner/go-ma/msg"
"github.com/gdamore/tcell/v2"
p2ppubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/rivo/tview"
)
Expand Down Expand Up @@ -65,6 +66,12 @@ func NewChatUI(p *p2p.P2P, a *actor.Actor) (*ChatUI, error) {

app := tview.NewApplication()

tview.Styles.PrimitiveBackgroundColor = tcell.ColorNavajoWhite
tview.Styles.PrimaryTextColor = tcell.ColorBlack
tview.Styles.ContrastBackgroundColor = tcell.ColorNavajoWhite
tview.Styles.BorderColor = tcell.ColorDarkGray
tview.Styles.TitleColor = tcell.ColorDarkSlateGray

// make a text view to contain our chat messages
msgBox := setupMsgbox(app)

Expand Down

0 comments on commit 7d5107f

Please sign in to comment.