I need help with my program ( PROCESSING 3.0)

hi i need help. i have a settings page for this program that has a function to turn the border on and off, which is controlled by the boolean borders. however, another function, which can turn the background on or off, the boolean backgroundImage seems to be interfering with the borders. so the borders can be turned on or off by pressing the buttons for it in the settings page, but if i turn the background to low and then high and i turn borders off right after they wont turn off. below is the code for my program. reply if you need the images for the program.


PImage background;
PImage title;
PImage info;
PImage booklog;
PImage bookmark;
PImage returnMenu;
PImage cog;
PImage settingsTitle;
PImage backgroundLow;
PImage backgroundHigh;
PImage faststartOn;
PImage faststartOff;
PImage borderOn;
PImage borderOff;


PFont font;

float titleTransparency;
float buttonSpeed;
float buttonTransparency;



int bookmarkState;
int logState;
int infoState;
int settingsState;


boolean faststart;
boolean backgroundImage;
boolean borders;







void settings () {


  fullScreen(P3D);
}

void setup () {
  

  frameRate(100);

  background = loadImage ("background.jpg");
  title = loadImage ("title.png");
  info = loadImage ("infobutton.png");
  booklog = loadImage ("logbutton.png");
  bookmark = loadImage ("top10button.png");
  returnMenu = loadImage ("return.png");
  cog = loadImage ("settings.png");
  settingsTitle = loadImage("settingstitle.png");
  backgroundLow = loadImage("backgroundlow.png");
  backgroundHigh = loadImage("backgroundhigh.png");
  borderOn = loadImage("borderon.png");
  borderOff = loadImage("borderoff.png");
  faststartOn = loadImage("faststarton.png");
  faststartOff = loadImage("faststartoff.png");
  

  font = createFont ("font.ttf", 50);

  bookmarkState = 0;
  logState = 0;
  infoState = 0;
  settingsState = 0;


  titleTransparency = 0;
  buttonTransparency = 0;
  buttonSpeed = height;


  faststart = false;
  backgroundImage = true;
  borders = true;
}

void draw () {

  if (backgroundImage==true) {
    Background();
  }

  if (backgroundImage==false) {
    background(223, 195, 123);
  }  

  if (borders==true) {
  border();
  }
  

  textAlign(LEFT);

  if (bookmarkState==0 && logState==0 && infoState==0 && settingsState==0) {
    Title();
    infoButton();
    logButton();
    bookmarkButton();
    menuInformation();
    settingsButton();
  }


  if (infoState==1 || bookmarkState==1 || logState==1 || settingsState==1) {
    returnMenu();
  }

  if (infoState==1) {
    infoScreen();
  }

  if (settingsState==1) {
    settingsScreen();
  }
  
  if (bookmarkState==1) {
    bookmarkScreen();
  }
}


void Background () {
  image(background, 0, 0, width, height);
}



void Title () {

  tint(255, titleTransparency);
  image(title, width/3.764705882, height/10.5);

  if (faststart==false) {
    titleTransparency += 2;
  }
}


void infoButton () {

  tint(255, buttonTransparency);
  image(info, width/5.647058824, buttonSpeed);
}


void logButton () {

  tint(255, buttonTransparency);
  image(booklog, width/2.37037037, buttonSpeed-20);
}


void bookmarkButton () {

  tint(255, buttonTransparency);
  image(bookmark, width/1.5, buttonSpeed);
}


void menuInformation () {

  if (titleTransparency>254) {
    if (faststart==false) {
      buttonTransparency += 2.5;
      if (buttonSpeed>height/2) {
        buttonSpeed -= 4;
      }
    }
  }

  if (faststart==true) {

    titleTransparency=255;
    buttonTransparency=255;
    buttonSpeed=height/2;
  }

  if (buttonSpeed<=height/2) {

    if (mouseX > width/1.5+25 && mouseX < width/1.5+250 && mouseY > height/2+25 && mouseY < height/2+250) {
      fill(0);
      textFont(font);
      text("Click here to view your bookmarks", 20, height-40);
    }

    if (mouseX > width/5.647058824+25 && mouseX < width/5.647058824+250 && mouseY > height/2+25 && mouseY < height/2+250) {
      fill(0);   
      textFont(font);
      text("Click here for more information on ReadMore", 20, height-40);
    }

    if (mouseX > width/2.37037037+25 && mouseX < width/2.37037037+250 && mouseY > height/2+25 && mouseY < height/2+250) {
      fill(0);
      textFont(font);
      text("Click here to create and manage your book log", 20, height-40);
    }

    if (mouseX > width/1.2 && mouseX < width/1.2+421 && mouseY > 0 && mouseY < 324) {

      fill(0);
      textFont(font);
      text("Click here to manage your program preferences", 20, height-40);
    }
  }
}



void border () {

  strokeWeight(30);
  stroke(0);
  line(0, 0, width, 0);
  line(0, 0, 0, height);
  line(0, height, width, height);
  line(width, 0, width, height);
}


void returnMenu() {

  image(returnMenu, width/38.4, height/21.6, 70, 70);



  if (mouseX > width/38.4 && mouseX < width/38.4+70 && mouseY > height/21.6 && mouseY < height/21.6+70) {
    fill(0);
    textFont(font);
    text("Click here to return to the main menu", 20, height-40);
  }
}



void infoScreen () {

  fill(0);
  textAlign(CENTER);
  textFont(font);


  textMode(SHAPE);
  textSize(100);
  text("ReadMore", width/2, height/5.4);

  textMode(MODEL);
  textSize(50);
  text("Readmore is a freeware application that helps \n people log and record all of the books they \n have read over time. it can help keep track of books \n you have finished, books you have not finished and can also help keep \n track of books you are currently reading with bookmarks", width/2, height/2.7);

  textMode(MODEL);
  textSize(35);
  text("Design and Code by Aman Shahid \n Processing 3.0 was used to \n create this application", width/2, height/1.22727272727);
}


void settingsButton () {

  image(cog, width/1.2, 0);
}


void settingsScreen() {

  image(settingsTitle, width/3.764705882, height/10.5);


  if (backgroundImage==true) {

    image(backgroundHigh, width/5.647058824+70, height/2);
  }

  if (backgroundImage==false) {

    image(backgroundLow, width/5.647058824+70, height/1.4);
  }
  
  
  if (borders==true) {

    image(borderOn, width/2.37037037+70, height/2);
  }

  if (borders==false) {

    image(borderOff, width/2.37037037+70, height/1.4);
  }
  

  if (faststart==true) {

    image(faststartOn, width/1.5+70, height/2);
  }

  if (faststart==false) {

    image(faststartOff, width/1.5+70, height/1.4);
  }
}



void bookmarkScreen () {
  

  
}





void mouseReleased () {

  if (buttonSpeed<=height/2) {

    if (mouseX > width/1.5+25 && mouseX < width/1.5+250 && mouseY > height/2+25 && mouseY < height/2+250 && logState==0 && infoState==0 && settingsState==0) {
      bookmarkState=1;
    }


    if (mouseX > width/2.37037037+25 && mouseX < width/2.37037037+250 && mouseY > height/2+25 && mouseY < height/2+250 && bookmarkState==0 && infoState==0 && settingsState==0) {
      logState=1;
    }


    if (mouseX > width/5.647058824+25 && mouseX < width/5.647058824+250 && mouseY > height/2+25 && mouseY < height/2+250 && bookmarkState==0 && logState==0 && settingsState==0) {
      infoState=1;
    }

    if (mouseX > width/1.2 && mouseX < width/1.2+421 && mouseY > 0 && mouseY < 324 && bookmarkState==0 && infoState==0 && logState==0) {
      settingsState=1;
    }


    if (infoState==1 || bookmarkState==1 || logState==1 || settingsState==1) {

      if (mouseX > width/38.4 && mouseX < width/38.4+70 && mouseY > height/21.6 && mouseY < height/21.6+70) {

        infoState=0;
        logState=0;
        bookmarkState=0;
        settingsState=0;

        titleTransparency = 0;
        buttonTransparency = 0;
        buttonSpeed = height;
      }
    }
  }





  if (backgroundImage==true && mouseX > width/5.647058824+70 && mouseX < width/5.647058824+70+175 && mouseY > height/2 && mouseY <height/2+100 && bookmarkState==0 && infoState==0 && logState==0) {

    backgroundImage=false;
  }  

  if (backgroundImage==false && mouseX > width/5.647058824+70 && mouseX < width/5.647058824+70+175 && mouseY > height/1.4 && mouseY <height/1.4+100 && bookmarkState==0 && infoState==0 && logState==0) {

    backgroundImage=true;
  }




  if (faststart==true && mouseX > width/1.5+70 && mouseX < width/1.5+70+175 && mouseY > height/2 && mouseY <height/2+100 && bookmarkState==0 && infoState==0 && logState==0) {

    faststart=false;
  }  

  if (faststart==false && mouseX > width/1.5+70 && mouseX < width/1.5+70+175 && mouseY > height/1.4 && mouseY <height/1.4+100 && bookmarkState==0 && infoState==0 && logState==0) {

    faststart=true;
  }
  
  
  
  
  if (borders==true && mouseX > width/2.37037037+70 && mouseX < width/2.37037037+70+175 && mouseY > height/2 && mouseY <height/2+100 && bookmarkState==0 && infoState==0 && logState==0) {

    borders=false;
  }  

  if (borders==false && mouseX > width/2.37037037+70 && mouseX < width/2.37037037+70+175 && mouseY > height/1.4 && mouseY <height/1.4+100 && bookmarkState==0 && infoState==0 && logState==0) {

    borders=true;
  }  
}

Right now, nobody can try your code since we don’t have all your images. You would have more luck with providing them.

My problem has been solved, apparently it was just my computer. ty for asking anyways