Scroll and stop text on LCD

And can someone help me with my first question? :slight_smile:

I have the program for scrolling one line of text on LCD display and now I want to stop this move using the button. When I stop, the text moves to the starting position, but I want to stop on the position before the using button (for example on the middle of display).

This is my code:

#include <LiquidCrystal.h>

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);           

int screenWidth = 16;
int screenHeight = 2;

String line1 = "line 1";
String line2 = "line 2";

int stringStart, stringStop = 0;
int scrollCursor = screenWidth;

int lcd_key     = 0;
int adc_key_in  = 0;

#define btnLEFT   3
int read_LCD_buttons() {           
    adc_key_in = analogRead(0);  
}

  

void setup()
{   lcd.begin(16, 2);  
} // start the library



 void loop() 
 {
{  lcd.setCursor(scrollCursor, 1);
  lcd.print(line2.substring(stringStart,stringStop));
  lcd.setCursor(0, 0);
  lcd.print(line1);
  delay(300);
  lcd.clear();
  
  if(stringStart == 0 && scrollCursor > 0){
    scrollCursor--;
    stringStop++;
  } else if (stringStart == stringStop){
    stringStart = stringStop = 0;
    scrollCursor = screenWidth;
  } else if (stringStop == line2.length() && scrollCursor == 0) {
    stringStart++;
  }
    else if (btnLEFT){      
        lcd.print(line2.substring(stringStop));
  } 
  else {
    stringStart++;
    stringStop++;
  }
}
}

I understand my mistake, because I have declarated stringStop = 0

else if (btnLEFT){      
        lcd.print(line2.substring(stringStop));

but I don't have any other idea how can I stop this.