if(mousePressed){
cursor(maus2, maus2.width/2, maus2.height/2);
} else {
cursor(maus, maus.width/2, maus.height/2);}
why dont work? pls i need the help
if(mousePressed){
cursor(maus2, maus2.width/2, maus2.height/2);
} else {
cursor(maus, maus.width/2, maus.height/2);}
why dont work? pls i need the help
A man tried to cross the road and failed… why did he fail?
Your code gives us about as much context as the sentence above. Post more code.
void mousePressed(){
if(mousePressed){
//if(mouseX>x && mouseX <x+w && mouseY>y && mouseY <y+h){
//launch(“C:/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe”);
//}
if(mousePressed){
//if(mouseX>1124 && mouseX <1124+93 && mouseY>765 && mouseY <765+93){
//link(“https://wallpaperplay.com/board/blue-space-wallpapers”);
//}
if(mousePressed){
cursor(maus2, maus2.width/2, maus2.height/2);
} else {
cursor(maus, maus.width/2, maus.height/2);}
}
}
}
your last condition is wrapped up in the first mousePressed statement
notice the highlighted bracket corresponds to the if(mousePressed function.
try this instead
void mousePressed(){
if(mousePressed){
if(mouseX>x && mouseX <x+w && mouseY>y && mouseY <y+h){
launch(“C:/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe”);
}
if(mousePressed){
if(mouseX>1124 && mouseX <1124+93 && mouseY>765 && mouseY <765+93){
link(“https://wallpaperplay.com/board/blue-space-wallpapers”);
}}
if(mousePressed){
cursor(maus2, maus2.width/2, maus2.height/2);
} else {
cursor(maus, maus.width/2, maus.height/2);}
}
}
Hey @MonteliaRO
welcome to the forum!
Nice to have you here!
please don’t delete your posts, since the good answers are then without context and therefore not understandable anymore.
Just leave your questions and answers as they are.
Thank you!
Regards, Chrisir