cloud-control-panel/test3/main.go

33 lines
646 B
Go

package main
import "log"
import "os"
import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"
import "git.wit.com/wit/gui"
func TestAttributedString() *ui.AttributedString {
newText := ui.NewAttributedString("")
gui.AreaAppendText(newText, "Welcome to the Cloud Control Panel\n", ui.TextSize(16), ui.TextColor{0.0, 0.0, 0.8, .8}) // "RGBT"
return newText
}
func main() {
// THIS CRASHES IF YOU RUN IT HERE
// text := TestAttributedString()
// log.Println("text =", text)
ui.Main(setupUI)
}
func setupUI() {
// this doesn't crash here
text := TestAttributedString()
log.Println("text =", text)
os.Exit(0)
}