コード例 #1
0
ファイル: win-mouse.go プロジェクト: drhodes/go-sfml
// Get the current position of the mouse
// This function returns the current position of the mouse
// cursor relative to the given window.
func MouseGetPosition(win Window) (int, int) {
	v := C.sfMouse_getPosition(win.Cref)
	return int(v.x), int(v.y)
}
コード例 #2
0
ファイル: win-mouse.go プロジェクト: drhodes/go-sfml
// Get the current position of the mouse
// This function returns the current position of the mouse
// cursor relative to the desktop
func MouseGetPositionAbsolute() (int, int) {
	v := C.sfMouse_getPosition(nil)
	return int(v.x), int(v.y)
}