YAMILDIAZ

editar

Jun 27th, 2024
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.50 KB | Source Code | 0 0
  1. do{
  2.  
  3.     rlutil::setBackgroundColor(rlutil::COLOR::BLACK);
  4.     rlutil::setColor(rlutil::COLOR::WHITE);
  5.     rlutil::hidecursor();
  6.  
  7.     showItemC("¿Que dato desea editar? ", 60, 12, false);
  8.     showItemC("Email ", 60, 14, y == Opcion1);
  9.     showItemC("Telefono ", 60, 16, y == Opcion2);
  10.     showItemC("Direccion ", 60, 18, y == Opcion3);
  11.     showItemC("Volver al menu anterior ", 60, 20, y == Opcion4);
  12.  
  13.     switch (rlutil::getkey())
  14.     {
  15.     case 14: // UP
  16.         rlutil::locate(28, 10 + y);
  17.         std::cout << " " << std::endl;
  18.         y--;
  19.         if (y < 0) {
  20.             y = 0;
  21.         }
  22.         break;
  23.     case 15: // DOWN
  24.         rlutil::locate(28, 10 + y);
  25.         std::cout << " " << std::endl;
  26.         y++;
  27.         if (y > 3) {
  28.             y = 3;
  29.         }
  30.         break;
  31.     case 1: // ENTER
  32.         switch (y) {
  33.         case Opcion1:
  34.             rlutil::cls();
  35.             cout << "Ingrese nuevo email:";
  36.             getline(cin, e);
  37.             reg.setEmail(e);
  38.             break;
  39.         case Opcion2:
  40.             rlutil::cls();
  41.             tel = validarStringNumerico("Ingrese nuevo telefono: ");
  42.             reg.setTelefono(tel);
  43.             break;
  44.         case Opcion3:
  45.             rlutil::cls();
  46.             cout << "Ingrese nueva dirección: ";
  47.             d.Cargar();
  48.             reg.setDireccion(d);
  49.             break;
  50.         case Opcion4:
  51.             rlutil::cls();
  52.             Menu();
  53.             break;
  54.         }
  55.     }
  56. } while (opc != 0);
  57. system("pause");
Advertisement
Add Comment
Please, Sign In to add comment