summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-25 18:38:47 -0600
committerJeff Carr <[email protected]>2024-02-25 18:38:47 -0600
commit3e2805017e0f21b462eca2002690b68744127800 (patch)
tree90f8a50fca62d660b42f3b1caf1b10c1ca74ed27
parent42048ba99741827972a60a88b8ad03c6a0e4e801 (diff)
print a simple text colsole banner on init()
-rw-r--r--Makefile2
-rw-r--r--main.go23
-rw-r--r--release-logo.pngbin0 -> 116000 bytes
3 files changed, 24 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 43332b5..ebefe43 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
all:
+ @GO111MODULE=off go build
@echo
@echo This is the core gui package 'go.wit.com/gui/gui'
@echo
@echo It creates a binary tree of widgets
@echo The widgets are things like Windows, Buttons, Labels, etc
@echo
- @GO111MODULE=off go build
note-about-golang:
ifeq ($(GO111MODULE),)
diff --git a/main.go b/main.go
index 9474290..fe6ebc6 100644
--- a/main.go
+++ b/main.go
@@ -31,9 +31,32 @@ func init() {
me.flag.WidgetType = widget.Stdout
me.guiChan = make(chan widget.Action, 1)
+
+ fmt.Println("GO GUI version <ldflags here>", showVersion() + "<Bromeliaceae>")
+ log.Sleep(1)
go watchCallback()
}
+// what genius figured this out?
+// originally from github.com/dimasma0305/GoFetch
+func showVersion() string {
+ // var runes rune
+ // color1 := "\x1b[0;29m  \x1b[0m"
+ // runes = []rune(color1)
+ // view.WriteRunes(runes)
+
+ color1 := "\x1b[0;29m  \x1b[0m"
+ color2 := "\x1b[0;31m  \x1b[0m"
+ color3 := "\x1b[0;32m  \x1b[0m"
+ color4 := "\x1b[0;33m  \x1b[0m"
+ color5 := "\x1b[0;34m  \x1b[0m"
+ color6 := "\x1b[0;35m  \x1b[0m"
+ color7 := "\x1b[0;36m  \x1b[0m"
+ color8 := "\x1b[0;37m  \x1b[0m"
+
+ return color1 + " " + color2 + " " + color3 + " " + color4 + " " + color5 + " " + color6 + " " + color7 + " " + color8
+}
+
// lookup the widget by the id sent from the toolkit
func (n *Node) findId(i int) *Node {
if n == nil {
diff --git a/release-logo.png b/release-logo.png
new file mode 100644
index 0000000..5b8da73
--- /dev/null
+++ b/release-logo.png
Binary files differ