|
@@ -18,19 +18,8 @@ func pctUpdate(pct *int64) func() int64 {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// Can I add a function to Door?
|
|
|
-// NO: cannot define new methods on non-local type door.Door
|
|
|
-
|
|
|
-/*
|
|
|
-func (d *door.Door) PressAKey() {
|
|
|
- d.Write(door.Reset + door.CRNL + "Press a key to continue...")
|
|
|
- d.Key()
|
|
|
- d.Write(door.CRNL)
|
|
|
-}
|
|
|
-*/
|
|
|
-
|
|
|
func press_keys(d *door.Door) {
|
|
|
- d.Write(door.Reset + door.CRNL + "Press some keys...")
|
|
|
+ d.Write(door.Reset + door.CRNL + "Press some keys... <ENTER> to exit.")
|
|
|
var r rune
|
|
|
var ex door.Extended
|
|
|
var err error
|
|
@@ -690,7 +679,13 @@ func main() {
|
|
|
// press_a_key(&d)
|
|
|
d.Write(door.CRNL)
|
|
|
|
|
|
- var b []string = door.AlertBox("Warning: golang is in use!", 1)
|
|
|
+ var b []string
|
|
|
+ if door.CP437 {
|
|
|
+ b = door.AlertBox("Warning: golang \xfb is in use!", 1)
|
|
|
+ } else {
|
|
|
+ b = door.AlertBox("Warning: golang \u221a is in use!", 1)
|
|
|
+ }
|
|
|
+
|
|
|
d.Write(door.ColorText("BRI WHI ON GREEN"))
|
|
|
for _, line := range b {
|
|
|
d.Write(line + door.CRNL)
|
|
@@ -718,6 +713,8 @@ func main() {
|
|
|
}
|
|
|
option := mainmenu.GetOption(choice)
|
|
|
|
|
|
+ wopr.Stop()
|
|
|
+
|
|
|
// fmt.Printf("Choice: %d, Option: %c\n", choice, option)
|
|
|
|
|
|
switch option {
|
|
@@ -759,6 +756,7 @@ func main() {
|
|
|
_ = z
|
|
|
}
|
|
|
|
|
|
+ wopr.Animate(&d)
|
|
|
}
|
|
|
|
|
|
// d.Write("\x1b[?1000l") // disable mouse
|