示例#1
0
文件: intro.go 项目: karlek/reason
func printJourney() {
	width, height := termbox.Size()
	msgPos := width/2 - len(journeyStr)/2

	ui.ClearLineOffset(height/2, msgPos)

	t := text.New(journeyStr, termbox.AttrBold)
	ui.Print(t, msgPos, height/2, 0)
}
示例#2
0
文件: intro.go 项目: karlek/reason
func printName() {
	width, height := termbox.Size()

	offsetX := width/2 - len(nameStr)/2
	offsetY := height/2 + 2
	ui.ClearLineOffset(offsetY, offsetX)

	t := text.New(name, termbox.AttrBold+termbox.ColorBlack)
	ui.Print(t, offsetX+1, offsetY, 0)
}
示例#3
0
文件: intro.go 项目: karlek/reason
func removeEnterSign() {
	width, height := termbox.Size()
	msgPos := width/2 + len(journeyStr)/2

	ui.ClearLineOffset(height/2, msgPos)
}