本文整理汇总了Golang中github.com/paulfchristiano/dwimmer/dynamics.Dwimmer.PrintCh方法的典型用法代码示例。如果您正苦于以下问题:Golang Dwimmer.PrintCh方法的具体用法?Golang Dwimmer.PrintCh怎么用?Golang Dwimmer.PrintCh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/paulfchristiano/dwimmer/dynamics.Dwimmer
的用法示例。
在下文中一共展示了Dwimmer.PrintCh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: nativePutChar
func nativePutChar(d dynamics.Dwimmer, s *term.SettingT, char, xt, yt term.T) term.T {
c, err := represent.ToRune(d, char)
if err != nil {
return term.Make("asked to write character, but received [] " +
"while converting to a character").T(err)
}
x, err := represent.ToInt(d, xt)
if err != nil {
return term.Make("asked to write character, but received [] "+
"while converting coordinate [] to an integer").T(err, xt)
}
y, err := represent.ToInt(d, yt)
if err != nil {
return term.Make("asked to write character, but received [] "+
"while converting coordinate [] to an integer").T(err, yt)
}
d.SetCursor(x, y)
d.PrintCh(c)
return core.OK.T()
}