Press a button and move the joystick

Hello,

Here is my final version that works

// Begin Joystick_Frontlader
int wert_Blau = 0;
int wert_Gelb = 0;
int rueck_3;
int rueck_4;
// Ende Joystick_Frontlader

void setup() {
  // Begin Taster_Frontladerhebel
  pinMode(17, INPUT_PULLUP);
  pinMode(16, INPUT_PULLUP);
  Joystick.begin();
  // Ende Taster_Frontladerhebel
}

void loop() {
  Taste_3();
  Taste_4();
  Joystick_Frontlader();
}

void Taste_3(){
  byte Taste_3 = 0; 
  Taste_3 = digitalRead(17);
  if(Taste_3 == 1){
    rueck_3 = 1;
  }
  Joystick.button(1,Taste_3);
  if(Taste_3 == 0 && rueck_3 == 1){
    Joystick.button(1,1);
    Joystick.X(512);
    Joystick.Y(512);
    Joystick.button(1,0);
    rueck_3 = 0;
  }
}

void Taste_4(){
  byte Taste_4 = 0; 
  Taste_4 = digitalRead(16);
  if(Taste_4 == 1){
    rueck_4 = 1;
  }
  Joystick.button(2,Taste_4); 
  if(Taste_4 == 0 && rueck_4 == 1){
    Joystick.button(2,1);
    Joystick.X(512);
    Joystick.Y(512);
    Joystick.button(2,0);
    rueck_4 = 0;
  }
}
void Joystick_Frontlader(){
  wert_Blau = analogRead(A9) - analogRead(A8);
  wert_Gelb = analogRead(A7) - analogRead(A6); 
  bool bewegt = false;
  if(0 <= wert_Blau && wert_Blau <= 60){
      Joystick.X(512);
    }
    else if(wert_Blau < 0){
      Joystick.X(512+wert_Blau);
      bewegt = true;
    }
    else if(wert_Blau > 60){
      Joystick.X(512+wert_Blau);
      bewegt = true;
    }
  if(-60 <= wert_Gelb && wert_Gelb <= -20){
      Joystick.Y(512);
    }
    else if(wert_Gelb < -60){
      Joystick.Y(512+wert_Gelb);
      bewegt = true;
    }
    else if(wert_Gelb > -20){
      Joystick.Y(512+wert_Gelb);
      bewegt = true;
    }
    if (bewegt == true){
      Serial.println("bewegt");
      delay(30);
      Joystick.X(512);
      Joystick.Y(512);
    }
}

Or does anyone have a better solution