|
@@ -168,7 +168,7 @@ func MainMenu() door.Menu {
|
|
|
menu.Activated = func(item int, d *door.Door) {
|
|
|
var line string = descriptions[item]
|
|
|
var lines []string = strings.Split(wordwrap.WrapString(line, uint(panelWidth)), "\n")
|
|
|
- for idx, _ := range descPanel.Lines {
|
|
|
+ for idx := range descPanel.Lines {
|
|
|
if idx >= len(lines) {
|
|
|
descPanel.Lines[idx].Text = ""
|
|
|
} else {
|
|
@@ -444,11 +444,11 @@ func progress_bars(d *door.Door) {
|
|
|
var bar2 door.BarLine = door.BarLine{Width: 30, Style: door.SOLID, PercentStyle: door.PERCENT_SPACE}
|
|
|
|
|
|
bar2.ColorRange = []door.BarRange{
|
|
|
- {2500, door.ColorText("RED")},
|
|
|
- {5000, door.ColorText("BROWN")},
|
|
|
- {7500, door.ColorText("BOLD YEL")},
|
|
|
- {9500, door.ColorText("GREEN")},
|
|
|
- {10100, door.ColorText("BRI GRE")}}
|
|
|
+ {Percent: 2500, Color: door.ColorText("RED")},
|
|
|
+ {Percent: 5000, Color: door.ColorText("BROWN")},
|
|
|
+ {Percent: 7500, Color: door.ColorText("BOLD YEL")},
|
|
|
+ {Percent: 9500, Color: door.ColorText("GREEN")},
|
|
|
+ {Percent: 10100, Color: door.ColorText("BRI GRE")}}
|
|
|
|
|
|
var bar3 door.BarLine = door.BarLine{Width: 15, Style: door.GRADIENT, Line: door.Line{DefaultColor: door.ColorText("CYAN")}}
|
|
|
|
|
@@ -618,7 +618,7 @@ func main() {
|
|
|
|
|
|
go func() {
|
|
|
var output string
|
|
|
- for _ = range ticker.C {
|
|
|
+ for range ticker.C {
|
|
|
output = door.SavePos + door.Goto(door.Width-15, 1) + spin.Output() +
|
|
|
door.Goto(door.Width-16, 3) + spin2.Output() + door.RestorePos
|
|
|
if !d.Disconnect() {
|
|
@@ -672,7 +672,7 @@ func main() {
|
|
|
|
|
|
|
|
|
d.Write("\x1b[?1000h")
|
|
|
-
|
|
|
+
|
|
|
press_keys(&d)
|
|
|
|
|
|
d.Write(door.CRNL)
|
|
@@ -749,7 +749,7 @@ func main() {
|
|
|
}
|
|
|
|
|
|
d.Write("\x1b[?1000l")
|
|
|
-
|
|
|
+
|
|
|
d.Write(door.Reset + door.CRNL)
|
|
|
|
|
|
message = fmt.Sprintf("Returning to the %s BBS..."+door.CRNL, d.Config.BBSID)
|