Beispiel #1
0
func iconsTextAnywhereDemo(l *lsi.LCDSysInfo) {
	l.Clear(lsi.LINE_ALL, lsi.BG_COLOR_BLACK)
	time.Sleep(500 * time.Millisecond)

	l.DrawIconAnywhere(0, 0, 15)
	time.Sleep(60 * time.Millisecond)
	l.DrawIconAnywhere(12, 20, 27)
	time.Sleep(60 * time.Millisecond)
	l.DrawIconAnywhere(20, 120, 16)
	time.Sleep(60 * time.Millisecond)
	l.DrawIconAnywhere(247, 199, 17)
	time.Sleep(60 * time.Millisecond)
	l.DrawIconAnywhere(120, 100, 18)
	time.Sleep(60 * time.Millisecond)
	l.DrawIconAnywhere(279, 56, 20)
	time.Sleep(60 * time.Millisecond)
	l.DrawIconAnywhere(50, 156, 8)
	time.Sleep(60 * time.Millisecond)
	l.SetTextBackgroundColor(lsi.BG_COLOR_RED)
	l.DrawTextAnywhere(75, 20, "1234567890!", lsi.FG_COLOR_YELLOW)
	time.Sleep(60 * time.Millisecond)
	l.DrawTextAnywhere(75, 120, "abcdefghijk!", lsi.FG_COLOR_YELLOWGREEN)
	l.SetTextBackgroundColor(lsi.BG_COLOR_BLACK)
}
Beispiel #2
0
func textDemo(l *lsi.LCDSysInfo) {
	l.Clear(lsi.LINE_ALL, lsi.BG_COLOR_BLACK)
	time.Sleep(500 * time.Millisecond)

	l.Clear(lsi.LINE_2, lsi.BG_COLOR_RED)
	time.Sleep(50 * time.Millisecond)

	l.DrawIconOnGrid(0, 14)
	l.SetTextBackgroundColor(lsi.BG_COLOR_BLACK)
	l.DrawTextOnLine(1, "|LCDsysinfo", true, lsi.TEXT_ALIGN_LEFT, lsi.FG_COLOR_YELLOW)
	l.DrawIconOnGrid(6, 8)
	l.SetTextBackgroundColor(lsi.BG_COLOR_RED)
	l.DrawTextOnLine(2, "Enter your message", false, lsi.TEXT_ALIGN_LEFT, lsi.FG_COLOR_LIGHT_GREEN)
	l.SetTextBackgroundColor(lsi.BG_COLOR_BLACK)
}