Self-loading progress bar

So I spent yesterday afternoon and some of this morning trying to get somewhere on my own, and failing spectacularly.

As I'm sure many before me have, I'm trying to re-create the screen from the 2012 Dredd Lawgiver, and while I've stumbled through a good portion of it, I'm getting stuck with the initial "DNA check" progress bar.

I've looked at various "progress bar" and "loading bar" tutorials, and either they use a potentiometer that I can't work out how to remove, or they use a library I'm not using (and for the sake of cleanliness, would like to not use). I found one that made some kind of sense that used the old version of u8g - Which I thought was a great start because, although in French, I'm already using u8g2. However. The code will compile, it'll upload, but the loading bar does diddly squat.

I've tried the bar-drawing in various ways, and it never seems to .. draw. I've used the u8g2.setDrawColor in every which way I can think of, but that doesn't seem to make any difference to anything but the rest of the display.

#include <Arduino.h>
#include <U8g2lib.h>

int lbar=0;

U8G2_SSD1305_128X32_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, 10, 9, 12, 11, 13);

void setup(void) {
  u8g2.begin();
  u8g2.clearBuffer();
//Progress bar--------------------------------------------------------------------------------
lbar++;
if (lbar >100)  lbar=0;

  delay(100);
  u8g2.sendBuffer();
  u8g2.drawBox (1,1,lbar,6);

//Progress bar--------------------------------------------------------------------------------
  
}

void loop(void) {


//glyph drawings
  //u8g2.setFont(u8g2_font_unifont_t_symbols);
  //u8g2.drawGlyph (0,7, 0x23F9);
  //u8g2.drawGlyph (7,7, 0x23F9);
  //u8g2.drawGlyph (15,7, 0x23F9);

  
//Text-noninverse
  u8g2.setFont(u8g2_font_artossans8_8u);
  u8g2.setCursor(2,22);
  u8g2.print("DNA CHECK");
  u8g2.setFont(u8g2_font_profont10_tf);
  u8g2.setCursor(104,22);
  u8g2.print("RAPID");

  //NUMBERS
  u8g2.setFont(u8g2_font_4x6_tr);
  //DISTANCE-NUM
  u8g2.setCursor(9,32);
  u8g2.print("0.0");
  //AP-NUM
  u8g2.setCursor(23,32);
  u8g2.print("25");
  //IN-NUM
  u8g2.setCursor(48,32);
  u8g2.print("25");
  //HE-NUM
  u8g2.setCursor(79,32);
  u8g2.print("25");
  //FMJ-NUM
  u8g2.setCursor(102,32);
  u8g2.print("25");
  
  //TEXT
  //Distance-TEXT
  u8g2.setCursor(2,32);
  u8g2.print("D:");
  //AP-TEXT
  u8g2.setCursor(32,32);
  u8g2.print("ap");
  //IN-TEXT
  u8g2.setCursor(57,32);
  u8g2.print("in");
  //HE-TEXT
  u8g2.setCursor(89,32);
  u8g2.print("he");
  //FMJ-TEXT
  u8g2.setCursor(111,32);
  u8g2.print("fmj");

//Linedrawings
  //horizontal and vertical lines bottom
  u8g2.drawLine(1,25,127,25);
  u8g2.drawLine(21,31,21,25);
  u8g2.drawLine(46,31,46,25);
  u8g2.drawLine(77,31,77,25);
  u8g2.drawLine(100,31,100,25);
  //angled lines top right
  u8g2.drawLine(121,1,120,6);
  u8g2.drawLine(123,1,122,6);
  u8g2.drawLine(125,1,124,6);
  u8g2.drawLine(127,1,126,6);



  
  u8g2.sendBuffer();
  delay(1000);  
}

That's the entire sketch as it stands right at this moment. I think 90% of it can be safely ignored, because I can't see how it'd be having an effect, but I could be being dumb.

I've tried so many different iterations I've lost track of exactly what I've tried, but. I know the 'drawing' as such kind of works, as if I change the int lbar=0 value, it draws whatever value I put in there - But doesn't do much else.

The end goal, for those unfamiliar with the film, is that when it boots up the screen displays "DNA CHECK" as a bar scrolls across the top to whatever the end ends up being (Which I believe is controlled by that if statement at the start). While this is displayed a red LED is lit, and when the bar reaches its complete state the "DNA CHECK" portion changes to "I.D OK", and the LED changes to green.

That's the end goal for this little project.

But I've reached the end of what I can muddle through. Can anyone point at where I'm going wrong?

they use a potentiometer that I can't work out how to remove

The value from the potentiometer is what defines the "progress". If you have some other value that defines the "progress", simply use that instead of reading the potentiometer.

I think 90% of it can be safely ignored

Well, duh. Much of is commented out code. Delete that crap before posting.

if I change the int lbar=0 value, it draws whatever value I put in there - But doesn't do much else.

The ONLY place you use lbar is in setup().

If you expect to show "progress", and lbar is supposed to represent that "progress", you need to, in loop(), actually make some "progress", by changing the value in lbar.

PaulS:
The value from the potentiometer is what defines the "progress". If you have some other value that defines the "progress", simply use that instead of reading the potentiometer.

Well, yes, but my point is I can't work out how to do that.

Well, duh. Much of is commented out code. Delete that crap before posting.

I mean.. It's like four lines of code that are commented out. The rest is so I know what's what without having to think about it.. I thought commenting your code for ease of interpretation was somewhat standard practice.

The ONLY place you use lbar is in setup().

If you expect to show "progress", and lbar is supposed to represent that "progress", you need to, in loop(), actually make some "progress", by changing the value in lbar.

Okay. I think my misunderstanding of all this was, I was expecting "loop" to mean it, well, looped.

Having moved the //Progress bar -- section into loop it is now doing what I wanted, albeit slowly, but I think I can work it out from here.

Thanks for your input!