[chronojump/michrolab] Minor aesthetic changes in person selection



commit 3e538480c91327b1367706b6914ede932d454607
Author: Xavier Padullés <testing chronojump org>
Date:   Fri Aug 26 14:29:40 2022 +0200

    Minor aesthetic changes in person selection

 arduino/michrolab/personsManage.ino | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/arduino/michrolab/personsManage.ino b/arduino/michrolab/personsManage.ino
index 1be0cc0dd..185b6306b 100644
--- a/arduino/michrolab/personsManage.ino
+++ b/arduino/michrolab/personsManage.ino
@@ -180,7 +180,7 @@ void selectPersonDialog()
     {
       //Deleting last list
       showPersonList(BLACK);
-      
+
       currentPerson = (currentPerson + 1) % totalPersons;
 
       //Printing new list
@@ -193,7 +193,7 @@ void selectPersonDialog()
 
 void showPersonList(unsigned int color)
 {
-  int xPosos = 10;
+  int xPos = 10;
   int midYPos = 110;
   int currentY = 0;
   printTftText("Select person", 40, 20, color, 3);
@@ -207,9 +207,12 @@ void showPersonList(unsigned int color)
         currentY = midYPos + i * 16 + 8;
       }
       printTftText(persons[(currentPerson + totalPersons + i) % totalPersons].name + " " + 
persons[(currentPerson + totalPersons + i) % totalPersons].surname,
-                   xPosos, currentY, color, 2);
+                   xPos, currentY, color, 2);
     }
   }
-  printTftText("[" + persons[currentPerson].name + " " + persons[currentPerson].surname + "]",
-               xPosos, midYPos, color, 3);
+  //  printTftText("[" + (persons[currentPerson].name + " " + 
persons[currentPerson].surname).substring(0,14) + "]",
+  //               xPos, midYPos, color, 3);
+  tft.fillRoundRect(0, midYPos -1 ,320, 25, 5, RED);
+  printTftText((persons[currentPerson].name + " " + persons[currentPerson].surname).substring(0, 17),
+               xPos, midYPos, color, 3);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]