diff options
Diffstat (limited to 'go-src/windows.go')
| -rw-r--r-- | go-src/windows.go | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/go-src/windows.go b/go-src/windows.go index 95478c6..beac8ed 100644 --- a/go-src/windows.go +++ b/go-src/windows.go @@ -117,10 +117,22 @@ func chatWindow(values ...string) { clearScreen() currChat := getChat(values[0]) - fmt.Println(currChat) + ui.NormalBox(true, "Chats", "Direct Messages", "Account", "Logout") + ui.TextField(currChat.Name + " : " + currChat.Description) + ui.TextField("Brought to you by " + currChat.Owner.Name + " (" + currChat.Owner.Username + ")") + ui.EmptyLine() + for _, v := range currChat.Messages { + ui.TextField(v) + } + ui.PageField(0, 0) - ui.InputField("Enter anything") - defer chatsWindow() + input := ui.InputField("Message or [C/D/A/L/</>/H]") + + handled := handleInputActions(input, true) + if !handled { + currChat.addMessage(strings.TrimPrefix(input, "\\"), loggedInUser.Username) + defer chatWindow(values...) + } } func logoutWindow(...string) { |
