|
@@ -13,10 +13,10 @@ import (
|
|
func display_information(d *door.Door) {
|
|
func display_information(d *door.Door) {
|
|
d.WriteS(door.Clrscr)
|
|
d.WriteS(door.Clrscr)
|
|
|
|
|
|
- var headerColor string = door.ColorText("BRI CYAN")
|
|
|
|
- var keyColor string = door.ColorText("BRI GREEN")
|
|
|
|
- var sepColor string = door.ColorText("BRI YEL")
|
|
|
|
- var valColor string = door.ColorText("CYAN")
|
|
|
|
|
|
+ var headerColor = door.ColorText("BRI CYAN")
|
|
|
|
+ var keyColor = door.ColorText("BRI GREEN")
|
|
|
|
+ var sepColor = door.ColorText("BRI YEL")
|
|
|
|
+ var valColor = door.ColorText("CYAN")
|
|
|
|
|
|
var nice_format func(string, string) string = func(key string, value string) string {
|
|
var nice_format func(string, string) string = func(key string, value string) string {
|
|
return fmt.Sprintf("%s%-20s %s: %s%s", keyColor, key, sepColor, valColor, value) + door.CRNL
|
|
return fmt.Sprintf("%s%-20s %s: %s%s", keyColor, key, sepColor, valColor, value) + door.CRNL
|
|
@@ -88,14 +88,14 @@ func input_demo(d *door.Door) {
|
|
|
|
|
|
case t := <-ticker.C:
|
|
case t := <-ticker.C:
|
|
const tf = "January 2, 2006 03:04:05 PM MST"
|
|
const tf = "January 2, 2006 03:04:05 PM MST"
|
|
- output := door.SavePos + door.GotoS(5, 2) + door.ColorText("BRI WHI ON CYAN") + t.Format(tf) + door.RestorePos
|
|
|
|
|
|
+ output := door.SavePos + door.GotoS(5, 2) + door.ColorTextS("BRI WHI ON CYAN") + t.Format(tf) + door.RestorePos
|
|
d.WriteS(output)
|
|
d.WriteS(output)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}()
|
|
}()
|
|
|
|
|
|
- var inputColor string = door.ColorText("BRI WHI ON BLUE")
|
|
|
|
- var inputColor2 string = door.ColorText("BRI WHI ON GREEN")
|
|
|
|
|
|
+ var inputColor = door.ColorText("BRI WHI ON BLUE")
|
|
|
|
+ var inputColor2 = door.ColorText("BRI WHI ON GREEN")
|
|
var prompt *door.Line = door.NewLine("What is YOUR Name: ")
|
|
var prompt *door.Line = door.NewLine("What is YOUR Name: ")
|
|
|
|
|
|
prompt.RenderF = door.RenderBlueYellow
|
|
prompt.RenderF = door.RenderBlueYellow
|
|
@@ -195,7 +195,7 @@ func progress_bars(d *door.Door) {
|
|
func width_demo(d *door.Door) {
|
|
func width_demo(d *door.Door) {
|
|
var w int = door.Width
|
|
var w int = door.Width
|
|
var panel door.Panel = door.Panel{X: 1, Y: 1, Width: w}
|
|
var panel door.Panel = door.Panel{X: 1, Y: 1, Width: w}
|
|
- var lineColor string = door.ColorText("WHI")
|
|
|
|
|
|
+ var lineColor = door.ColorText("WHI")
|
|
var line string
|
|
var line string
|
|
|
|
|
|
for y := 1; y <= door.Height; y++ {
|
|
for y := 1; y <= door.Height; y++ {
|
|
@@ -232,7 +232,8 @@ func width_demo(d *door.Door) {
|
|
d.WriteA(door.Reset, panel.GotoEnd())
|
|
d.WriteA(door.Reset, panel.GotoEnd())
|
|
|
|
|
|
// Pause for key
|
|
// Pause for key
|
|
- d.WaitKey(door.Inactivity)
|
|
|
|
|
|
+ press_key_or_mouse(d)
|
|
|
|
+ // d.WaitKey(door.Inactivity)
|
|
|
|
|
|
panel.Lines = make([]*door.Line, 0)
|
|
panel.Lines = make([]*door.Line, 0)
|
|
var background string = "BUGZ Test Door in GO "
|
|
var background string = "BUGZ Test Door in GO "
|
|
@@ -251,5 +252,6 @@ func width_demo(d *door.Door) {
|
|
panel.Lines = append(panel.Lines, l)
|
|
panel.Lines = append(panel.Lines, l)
|
|
}
|
|
}
|
|
d.Write(panel.Output())
|
|
d.Write(panel.Output())
|
|
- d.WaitKey(door.Inactivity)
|
|
|
|
|
|
+ // d.WaitKey(door.Inactivity)
|
|
|
|
+ press_key_or_mouse(d)
|
|
}
|
|
}
|