YAMILDIAZ

lista

Jun 27th, 2024
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. int y = 0;
  2. rlutil::hidecursor();
  3.  
  4. while (true) {
  5. rlutil::cls();
  6.  
  7. rlutil::setBackgroundColor(rlutil::COLOR::BLACK);
  8. rlutil::setColor(rlutil::COLOR::WHITE);
  9. rlutil::hidecursor();
  10.  
  11. showItemC("Como desea ordenar el listado de Clientes?", 59, 8, false);
  12.  
  13.  
  14. showItemC("por orden de Carga ", 60, 12, y == Opcion1);
  15. showItemC("por Apellido ", 60, 14, y == Opcion2);
  16. showItemC("Volver al menu anterior ", 60, 16, y == Opcion3);
  17.  
  18.  
  19. switch (rlutil::getkey())
  20. {
  21. case 14: // UP
  22. rlutil::locate(28, 10 + y);
  23. std::cout << " " << std::endl;
  24. y--;
  25. if (y < 0) {
  26. y = 0;
  27. }
  28. break;
  29. case 15: // DOWN
  30. rlutil::locate(28, 10 + y);
  31. std::cout << " " << std::endl;
  32. y++;
  33. if (y > 3) {
  34. y = 3;
  35. }
  36. break;
  37. case 1: // ENTER
  38. switch (y) {
  39. case Opcion1:
  40. rlutil::cls();
  41. listarClientes();
  42. system("pause");
  43. break;
  44. case Opcion2:
  45. rlutil::cls();
  46. listarClientesXApellido();
  47. system("pause");
  48. break;
  49. case Opcion3:
  50. rlutil::cls();
  51. Menu();
  52. break;
  53. }
  54. }
  55. }
  56. system("pause");
  57.  
  58. return;
Advertisement
Add Comment
Please, Sign In to add comment