PImage a;
int x;
int y;
void setup() {
size(800, 600);
a = loadImage("pointer.jpg");
}
void draw()
{
background(102);
image(a, x, y);
x= width -mouseX;
y= height -mouseY;
if (x == mouseX && y == mouseY) {
//||
tint (0, 0, 0, 0);
noCursor();
}
else {
tint (255, 255, 255, 255);
cursor(ARROW);
}
}
Pienso en decisiones programadas, el si, el no, prendido, apagado, los caminos y el todo.
var a;
var x;
var y;
function setup() {
createCanvas(displayWidth, displayHeight);
a = loadImage("pointer.jpg");
}
function draw()
{
background(102);
image(a, x, y);
x= width -mouseX;
y= height -mouseY;
if (x == mouseX && y == mouseY) {
//||
tint (0, 0, 0, 0);
noCursor();
}
else {
tint (255, 255, 255, 255);
cursor(ARROW);
}
}
var a;
var x;
var y;
function setup() {
createCanvas(displayWidth, displayHeight);
a = loadImage("pointer.jpg");
}
function draw()
{
background(102);
image(a, x, y);
x= width -mouseX;
y= height -mouseY;
if (x == mouseX && y == mouseY) {
//||
tint (0, 0, 0, 0);
noCursor();
}
else {
tint (255, 255, 255, 255);
cursor(ARROW);
}
}
No hay comentarios:
Publicar un comentario