Exemplo n.º 1
0
func initscreen(s *Dvi) {
	curses.Initscr()
	curses.Cbreak()
	curses.Noecho()
	curses.Nonl()
	curses.Start_color()
	curses.Stdwin.Keypad(true)

	s.w = curses.Stdwin
	curses.Init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE)
	curses.Init_pair(2, curses.COLOR_RED, curses.COLOR_WHITE)
	curses.Init_pair(3, curses.COLOR_BLACK, curses.COLOR_YELLOW)
}
Exemplo n.º 2
0
func main() {
	x := 10
	y := 10
	startGoCurses()
	defer stopGoCurses()

	curses.Init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)

	loop(x, y)
}
Exemplo n.º 3
0
func main() {

	startGoCurses()
	defer stopGoCurses()

	curses.Init_pair(1, curses.COLOR_YELLOW, curses.COLOR_GREEN)

	smallwin, _ := curses.Stdwin.Derwin(1, 10, 10, 10)
	smallwin.Attron(curses.Color_pair(1))
	smallwin.Attron(curses.A_BOLD)

	smallwin.Addstr(0, 0, "Hello here", 0)
	smallwin.Getch()

	curses.Stdwin.Clear()
	curses.Stdwin.Refresh()

	smallwin.Resize(1, 5)
	smallwin.Mvwin(20, 20)
	smallwin.Addstr(0, 0, "There", 0)
	smallwin.Getch()

}