Przeglądaj źródła

Update about text and menu messages.

Bugz 1 rok temu
rodzic
commit
c169353f86
1 zmienionych plików z 14 dodań i 10 usunięć
  1. 14 10
      testdoor/testdoor.go

+ 14 - 10
testdoor/testdoor.go

@@ -99,10 +99,11 @@ func about_test_door(d *door.Door) {
 	for _, text := range []string{"",
 	for _, text := range []string{"",
 		"This door was written by Bugz.",
 		"This door was written by Bugz.",
 		"",
 		"",
-		"It is written in Go, understands CP437 and unicode, adapts",
-		"to screen sizes, uses door32.sys, supports TheDraw Fonts",
+		"It is written in Go, detects CP437/unicode, detects screen",
+		"size, supports door.sys & door32.sys, supports TheDraw Fonts",
 		"(the fonts are compiled into the door), has NoMoreSecrets",
 		"(the fonts are compiled into the door), has NoMoreSecrets",
-		"effect, and runs on Linux and Windows."} {
+		"and SpinRite effects, and runs on Linux",
+		"and sometimes even Windows..."} {
 		about.Lines = append(about.Lines, door.Line{Text: text, Width: W})
 		about.Lines = append(about.Lines, door.Line{Text: text, Width: W})
 	}
 	}
 
 
@@ -143,7 +144,6 @@ func MainMenu() door.Menu {
 	menu.AddSelection("S", "Show Panel")
 	menu.AddSelection("S", "Show Panel")
 	menu.AddSelection("T", "Test Door About")
 	menu.AddSelection("T", "Test Door About")
 	menu.AddSelection("W", "Screen Width")
 	menu.AddSelection("W", "Screen Width")
-
 	menu.AddSelection("Q", "Quit")
 	menu.AddSelection("Q", "Quit")
 
 
 	var descriptions []string = []string{
 	var descriptions []string = []string{
@@ -154,9 +154,9 @@ func MainMenu() door.Menu {
 		"Display TheDraw Fonts. Font information is compiled into the door.",
 		"Display TheDraw Fonts. Font information is compiled into the door.",
 		"Input some values, while updating the time.",
 		"Input some values, while updating the time.",
 		"Isn't this is a menu?",
 		"Isn't this is a menu?",
-		"Display various progress bar styles. Half step, display percentage, and gradient.",
-		"Show multiple panels.",
-		"Show more information about the door, using NoMoreSecrets effect.",
+		"Display various progress bar styles: half step, display percentage, and gradient.",
+		"Show multiple panels. Panels can be mouse drag/drop around.",
+		"Show about the door, using NoMoreSecrets effect.",
 		"Examples using the full width of the screen.",
 		"Examples using the full width of the screen.",
 		"Exit this door.",
 		"Exit this door.",
 	}
 	}
@@ -313,8 +313,8 @@ func font_demo(d *door.Door) {
 	d.Write(door.CRNL)
 	d.Write(door.CRNL)
 	press_a_key(d)
 	press_a_key(d)
 
 
-    // Anarchy Blue - no digits
-	var fab door.ColorFont = FontSerpent() 
+	// Anarchy Blue - no digits
+	var fab door.ColorFont = FontSerpent()
 	now = time.Now()
 	now = time.Now()
 	output, l = fab.Output(now.Format("01/02/2006"))
 	output, l = fab.Output(now.Format("01/02/2006"))
 	if l > door.Width {
 	if l > door.Width {
@@ -658,7 +658,7 @@ func panel_demo(d *door.Door) {
 	d.Write(single.Output())
 	d.Write(single.Output())
 	d.Write(double_single.Output())
 	d.Write(double_single.Output())
 	d.Write(single_double.Output())
 	d.Write(single_double.Output())
-	d.Write(door.Goto(1, 20) + door.Reset + "Use MOUSE to click/drag panels, R to Reset, Q to quit...")
+	d.Write(door.Goto(1, 20) + door.Reset + "Use MOUSE to click/drag panels, Right-Click Exits, R to Reset, Q to quit...")
 
 
 	var panels []TrackPanels = []TrackPanels{
 	var panels []TrackPanels = []TrackPanels{
 		{&panel, panel.X, panel.Y, panel.BorderColor},
 		{&panel, panel.X, panel.Y, panel.BorderColor},
@@ -679,6 +679,10 @@ func panel_demo(d *door.Door) {
 			m, ok := d.GetMouse()
 			m, ok := d.GetMouse()
 			if ok {
 			if ok {
 				// Process Mouse Event
 				// Process Mouse Event
+				if m.Button == 3 {
+					// Exit on right click
+					return
+				}
 				if m.Button == 1 {
 				if m.Button == 1 {
 					idx := FindPanel(m, panels)
 					idx := FindPanel(m, panels)
 					if idx != -1 {
 					if idx != -1 {