Touch screen keypad value input help

Going round in circles on the way to code this. Basicaly what I want to build is a keypad on a touchscreen that will allow you to update a value (xx.x). I am using UTFT, UTouch and UTFT_Buttons Libraries. I will build the GUI consisting of the old value being displayed, the new value inputed displayed (updated as you press the buttons) and a 12+2 "button" keypad 0-9 and "." "delete" "enter" and "cancle" Now how would I go about getting the keypad touchs to "build" the new value, i.e. press 7 -> display 7 press 2 -> display 72 press . -> display 72. press 3 -> display 72.3 press enter -> new value copied to old value or press 7 -> display 72 press 2 -> display 72 press enter -> new value "filled" to 72.0 and copied to old value

I was thinking using an array and counting the presses and putting the values in the right place, tracking if "." is pressed and the "building" the number by taking each value out of the array and multiplying it by the correct factor of 10

Has anyone done anything like this?

I made a keypad password screen that works. You may be able to store the characters in an array and then use atof(), make sure you include a null terminator. That is of course, if atof() is a recognized Arduino function, if not, you may need to take the long way around.

Added: atof does work.

char number[] = "12.34";

void setup() {
  Serial.begin(9600);
  delay(1);
  Serial.print(atof(number));
}

void loop() {
  
}

Interesting. Thanks or the hint, that that will make collecting the "number" and processing it to a float much easier