私はユーザーに、彼らが対話していると思うようにする背景画像を持っています。Processing
。画像には単語のリストがあり、ユーザーがその単語の周りの領域をクリックすると、サウンドが再生され、シリアル番号がArduinoに送信されます。処理中の特定の地域内でマウスを押した
これ以外にも、私はmousePressed
コードを正しく取得できません。私は今、println("yikes")
でそれをテストしています、そして、今私が "yikes"を得る画面をクリックする場所に関係します。
他にも私が理解できないエラーが発生しています。ヘルプは高く評価しました。
void setup() {
size(1475, 995);
// The image file must be in the data folder of the current sketch
// to load successfully
img = loadImage("PaceTaker.jpg"); // Load the image into the program
}
void draw() {
// Displays the image at its actual size at point (0,0)
image(img, 0, 0);
}
void mousePressed() {
if (mouseX>105 && mouseX<337 && mouseY>696 && mouseY<714);
{
println("yikes");
stroke(0);
}
else println("hello"));
}