Deprecated member drawString

I was using the Adafruit ILI9341library, modified by Alan Senior, and renamed #<Adafruit_ILI9341_AS.h> To continuously write to my countdown timer, I used the member called "drawString" as follows: void updateTimeDisplay () { char buf[20];//changed from 21, didn't have to be that big tft.drawRect(60,150,180, 100, ILI9341_RED); //timer frame tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK); //need black background or letters pile up sprintf(buf, " %02d:%02d", nowMinutes, nowSeconds); tft.drawString(buf, 62, 170, 2);
This works on UNO (big numbers counting down like a scoreboard) but I want to use the original Adafruit library <Adafruit.ILI9341.h> because I "think" it has more fonts and is certainly better supported. When I change it, I get the error "no member named 'drawString' found" I've since found out the term has been deprecated. So what do I use? I tried tft.println and trying to point to "buf" with *, but cannot get it to work. Full program on request, but this small snippet (a function) tells it all.

What are You talking about? Every helper is a complete newbie to Your project.
Full program on request..... Are You joking?
Read the first topic telling how to use this Forum, how and what information Forum expects.

if we are going to play snippets , what did you actually try?

I think the current method is to use tft.print, but that can result in the text simply overwriting the previous text without erasing it. You can get rid of the previous text either by drawing a box of the background color over the space occupied by the text (there is a function that will return the size of box required), or save the previous text and print it to the screen using the background color before printing the current text (tends to be the faster method).

It is ONE command, no longer used! It's like asking for a synonym for another word, you don't need the entire dictionary.
"drawString" is deprecated. What is used instead? Simple question.

Adafruit uses tft.println that prints text on a TFT/GLCD screen. Works well.
But when I try to print from the buffer, the OLD command to use is "drawString". I want to use the new Adafruit library that does NOT use "drawString" to achieve the same result.
Here's the complete program. Item of contention is in function "UpdateTimeDisplay".

#include <Adafruit_GFX.h>
//#include <Adafruit_GFX_AS.h> // Core graphics library special fonts
//#include <Adafruit_ILI9341_AS.h> // Hardware-specific library special fonts by Alan Senior
#include <Adafruit_ILI9341.h>
#include <SPI.h>
#include <ezButton.h>//debounce library
#define cs 8 // TFT CS pin to arduino/Teensy pin 8
#define rst 9 // TFT RST pin to arduino/Teensy pin 9
#define dc 10 // TFT DC pin to arduino/Teensy pin 10
//standard SPI pins MOSI 11, SCK 13 in library
#define timepb 4 // Start timer countdown don't debounce
#define timeset 7 // use resistor ladder to get 3 options: 10 sec,
// 1min, 20min. read analog, use case/switch statement
//#define lights // hardwire
//#define sound // hardwire
ezButton canpb(2);
ezButton oilpb(3);
Adafruit_ILI9341 tft = Adafruit_ILI9341(cs, dc, rst); //
int countDirection = -1; // direction of count: 1 for up, -1 for down, 0 for stopped
int nowMinutes = 1; // "minutes" part of time
int nowSeconds = 10; // "seconds" part of time
unsigned long millisNow = 0; // value of millis() at most recent 1/10 second
int setmin = nowMinutes;//needed for reset
int setsec = nowSeconds;
const unsigned long millisTick = 1000; // number of milliseconds per 1/10 second
int countCan=0;//reset to zero every power cycle
int countOil=0;
/Setup************/
void setup() {
Serial.begin(9600);//for troubleshooting
pinMode(timepb, INPUT_PULLUP);//no debounce needed
canpb.setDebounceTime(50); // set debounce time to 50 milliseconds
oilpb.setDebounceTime(50);
canpb.setCountMode(COUNT_RISING);
oilpb.setCountMode(COUNT_RISING);
tft.begin();
tft.setRotation(3);//
Scoreboard(); //static text, run once, stay on.
//credits();//credits for the design, start by switch
}
/Loop*/
void loop(void) {
canpb.loop(); // MUST call the loop() function first
oilpb.loop();
int canpbState = canpb.getState();
int oilpbState = oilpb.getState();
int countCan = canpb.getCount();
int countOil = oilpb.getCount();
tft.setCursor(70, 105); //put score in Montreal box
tft.println(countCan);
tft.setCursor(240, 105); //put score in Oilers box
tft.println(countOil);

    //Countdown starts
    if ((millis() - millisNow) >= millisTick) {
      nowSeconds += countDirection;
      millisNow += millisTick;
      // trade 60 seconds for 1 minute
      if (nowSeconds >= 60) {
        nowSeconds -= 60;//remove 60 seconds
        nowMinutes++;//add one minute
      }
      // trade 1 minute for 60 seconds
      if (nowSeconds < 0) {
        nowMinutes--;//remove minute
        nowSeconds += 60;
      }//add 60 seconds
    }
    //countdown is over
    if ((nowMinutes == 0) && (nowSeconds == 0)) {
      nowMinutes = setmin;
      nowSeconds = setsec;
    }    
    updateTimeDisplay();     
  }
  /********************Function Scoreboard************************/
  unsigned long Scoreboard() {//all static, run once at startup
    tft.fillScreen(ILI9341_BLACK);
    tft.setTextColor(ILI9341_CYAN);
    tft.setTextSize(4);
    tft.println(" FOUND FORUM");
    tft.setTextColor(ILI9341_GREEN);
    tft.setTextSize(3);
    tft.setCursor(0, 40); //x,y
    tft.println("Canadiens  Oilers");
    //Draw rectangles for scores
    tft.drawRect(50, 90, 70, 50, ILI9341_RED); //(x,y,w,h,color) Montreal on left
    tft.drawRect(220, 90, 70, 50, ILI9341_RED); //Oilers right
    tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK);
    tft.setTextSize(3);     
  }
  /************************Function UpdateTimeDisplay****************/
  void updateTimeDisplay () {
    char buf[20];//changed from 21, didn't have to be that big
    tft.drawRect(60,150,180, 100, ILI9341_RED); //timer frame
    tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK); //need black background or letters pile up
    sprintf(buf, "  %02d:%02d", nowMinutes, nowSeconds);
    tft.drawString(buf, 62, 170, 2);//only font size 2,4,6,7 are valid  x,y,size drawString 
                                    //only valid with Alan Senior GFX library. 4 is too big for rectangle
  }      
  /****************************Function Credits****************************/
  void credits()
  { tft.fillScreen(ILI9341_BLACK);
    tft.setTextColor(ILI9341_WHITE);
    tft.setTextSize(2);
    tft.setCursor(5, 5); //x,y
    tft.println("Models created by Jeremie Boyer, Montreal");
    tft.println("");
    delay(4000);
    tft.println("Printed on a Dremel 3D45 3D printer, PLA filament");
    tft.println("");
    delay(4000);
    tft.println ("Electronics, model design, printing and paint:Bob Found");
    tft.println("");
    delay(4000);
    tft.setTextColor(ILI9341_GREEN);
    tft.println ("For my son on his 50th birthday, Mar 11, 2022");
    delay(4000);
    tft.fillScreen(ILI9341_BLACK);
    tft.setCursor(5,10);
    tft.println("Found Engineering 2021");
    tft.println("");
    tft.println("");
    tft.println("Press xxx to exit");
  }
I guess I should be asking Adafruit?

I don't have a display hooked up in order to test it, so the cursor positioning may need to be adjusted:

/************************Function UpdateTimeDisplay****************/
void updateTimeDisplay () {
  static int oldMinutes = 0;
  static int oldSeconds = 0;
  char buf[20];//changed from 21, didn't have to be that big
  //NOTE - buf[8] should be large enough
  tft.drawRect(60, 150, 180, 100, ILI9341_RED); //timer frame
  //tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK); //need black background or letters pile up
  tft.setTextSize(2);
  //erase old text by overwriting using background color
  tft.setTextColor(ILI9341_BLACK);
  tft.setCursor(62,170);
  sprintf(buf, "  %02d:%02d", oldMinutes, oldSeconds);
  tft.print(buf);
  //print current text using foreground color
  tft.setTextColor(ILI9341_WHITE);
  tft.setCursor(62,170);
  sprintf(buf, "  %02d:%02d", nowMinutes, nowSeconds);
  tft.print(buf);
  oldMinutes = nowMinutes;
  oldSeconds = nowSeconds;
  //tft.drawString(buf, 62, 170, 2);//only font size 2,4,6,7 are valid  x,y,size drawString
  //only valid with Alan Senior GFX library. 4 is too big for rectangle
}

See the bottom half of this discussion for comments about drawString: https://forums.adafruit.com/viewtopic.php?t=32766

Thanks David. I found why I was having a problem after studying your code up above. I had been simply replacing tft.drawString with tft.print. In other words I was entering tft.print(buf, 6, 170,2). I had looked at the library I may have noticed that "print" did not take any location or size parameters. In your code they were separate.
So all I did was write tft.print(buf); and get my countdown on the screen, without any further manipulation except moving the countdown digits to proper location.
I may need your text-replace code later but for now there is no flickering or "digit pileup".