Пример #1
0
func (x *Imp) Exec() {
	//
	l, c := uint(0), uint(0)
	depth++
	if x.isMenu {
		for {
			if x.selected(l, c) {
				x.next.Exec()
			} else {
				break
			}
		}
	} else {
		if x.withTitle {
			bx.Wd(scr.NColumns())
			bx.Colours(menuheadF, menuheadB)
			bx.Write(x.text, l, c)
		} else {
			scr.Clr(l, c, scr.NColumns(), 1)
		}
		x.execute()
		scr.Cls()
	}
	depth--
	if depth == 0 {
		ker.Terminate()
	}
}
Пример #2
0
func write(a attribute, visible bool, Z, S uint) {
	//
	if visible {
		bx.Write(name[a], Z, S)
	} else {
		// bx.Clr (Z, S)
		scr.Clr(Z, S, length, 1)
	}
}
Пример #3
0
func (x *Set) Write(l, c uint) {
	//
	t := ""
	if x.Empty() {
		scr.Clr(l, c, uint(NAttrs), 1)
	} else {
		for a := Attr(1); a < NAttrs; a++ {
			if x.m[a] {
				t += string(txt[a][0])
			} else {
				t += " "
			}
		}
		setbx.Write(t, l, c)
	}
}