首页 > 文档 > mouseY鼠标的当前垂直坐标
2017
07-14

mouseY鼠标的当前垂直坐标

1-10.mouseY

Name(名称):mouseY//鼠标的当前垂直坐标。

Examples(例子):

void draw() {

background(204);

line(20, mouseY, 80, mouseY);

}

Description(描述):The system variable mouseY always contains the current vertical coordinate of the mouse.

系统变量mouseY总是包含鼠标的当前垂直坐标。

Note that Processing can only track the mouse position when the pointer is over the current window. The default value of mouseY is 0, so 0 will be returned until the mouse moves in front of the sketch window. (This typically happens when a sketch is first run.) Once the mouse moves away from the window, mouseY will continue to report its most recent position.

注意,当指针在当前窗口时,处理只能跟踪鼠标的位置。mouseY的默认值为0,所以0将会返回,直到鼠标移动到草图窗口前。(这通常发生在第一次运行草图的时候。)一旦鼠标离开窗口,mouseY将继续报告它最近的位置。

Related(相关函数):mouseX
pmouseX
pmouseY
mousePressed
mousePressed()
mouseReleased()
mouseClicked()
mouseMoved()
mouseButton
mouseWheel()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。