RidgeChat/ui/user_interface.go
2023-09-06 13:12:35 -06:00

33 lines
791 B
Go

package ui
import (
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/widget"
)
// StartGUI initializes and starts the GUI for the chat client
func StartGUI() {
// Initialize the Fyne app
myApp := app.New()
myWindow := myApp.NewWindow("RidgeChat - The World's most Ridged Self-Hosted Chat Program")
// Create UI elements
messageList := widget.NewLabel("Messages will appear here")
inputField := widget.NewEntry()
inputField.SetPlaceHolder("Type your message...")
sendButton := widget.NewButton("Send", func() {
// TODO: Implement send message logic
})
// Create layout
content := container.NewVBox(
messageList,
container.NewHBox(inputField, sendButton),
)
// Set and show the window content
myWindow.SetContent(content)
myWindow.ShowAndRun()
}