Run function once until button pressed

Hello all!

I'm developing a program in which when a value is exceeded, a warning will appear in a TFT .. But I just want this warning function to run once and can only exit from it with a press of a button!

While the button is not pressed, I want the warning function to be shown !!!WITHOUT blinking!!! meaning that this instruction has to be ignored inside the loop while button=HIGH so the program can continue calculating some sensor values.

any help?

Sounds pretty straightforward.
When you update the LCD, just check whether it's in warning state and act appropriately.

Record whether you're in warning state, and whether the button has been pressed - and when you actually read the sensor that determines whether you show warning, if it isn't indicating a warning condition, reset the warning state and the record that the button was pressed.

Shouldn't be to hard, whats your code now?