本文整理匯總了Golang中github.com/rthornton128/goncurses.Window.MovePrintln方法的典型用法代碼示例。如果您正苦於以下問題:Golang Window.MovePrintln方法的具體用法?Golang Window.MovePrintln怎麽用?Golang Window.MovePrintln使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/rthornton128/goncurses.Window
的用法示例。
在下文中一共展示了Window.MovePrintln方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: doHello
// Hello dialog. So the nooblets know the controls
func doHello(stdscr *gc.Window) {
stdscr.Refresh()
y, x := stdscr.MaxYX()
center_x := int(x / 2)
center_y := int(y / 2)
stdscr.MovePrintln(center_y-6, center_x-4, "Controls:")
stdscr.MovePrintln(center_y-5, center_x-12, "Escape: Exit the program.")
stdscr.MovePrintln(center_y-4, center_x-30, "Tab: Switch between the input window and the Message window.")
stdscr.MovePrintln(center_y-3, center_x-11, "Return: Send a message")
stdscr.MovePrintln(center_y-2, center_x-44, `Shift + Right Arrow: put in a new line '\n' character (like shift+return in facebook chat)`)
stdscr.MovePrintln(center_y-1, center_x-30, "Page-Up / Page-Down: Scroll up in the message history window")
}