# Move the mouse across the quadrants
# to see the cursor change
def draw
background(220)
line(width / 2, 0, width / 2, height)
line(0, height / 2, width, height / 2)
if mouseX < 50 && mouseY < 50
cursor(CROSS)
elsif mouseX > 50 && mouseY < 50
cursor('progress')
elsif mouseX > 50 && mouseY > 50
cursor('https://avatars0.githubusercontent.com/u/1617169?s=16')
else
cursor('grab')
end
end
カーソルのイメージを設定して表示します。
| 引数名 | 内容 | 備考 | オプション | デフォルト値 |
|---|---|---|---|---|
| type | カーソルタイプ |
ARROW CROSS HAND MOVE TEXT WAIT CSSプロパティ: 'grab', 'progress', 'cell'など その他、カーソルイメージへの外部パスも有効 |
||
| x | カーソルの水平アクティブスポット | 32以下の値 | ○ | (未詳) |
| y | カーソルの垂直アクティブスポット | 32以下の値 | ○ | (未詳) |
なし
・カーソルタイプの詳細については、下記の URLを参照してください。
cursor