Pascal/Turbo Pascal - problema con menu en pantalla(se superponen las lineas)

 
Vista:

problema con menu en pantalla(se superponen las lineas)

Publicado por juan (2 intervenciones) el 21/11/2012 14:13:51
hola gente, queria contarles que estamos haciendo un tp para la facu y creaamos un menu, con a su vez submenus adentro, el problema es que al seleccionar las opciones (al bajar por el menu) se entrecruzan las opciones doy un ejemplo.

1-jugar

2-configuracion

3-salir

Use las teclas direccionales para sellecionar.


supongamos que voy hasta salir quedaria asi

1-jugar
1-jugar
1-jugar
1-jugar
2-configuracion
2-configuracion
3-salir
3-salir

Use las teclas direccionales para sellecionar.
Use las teclas direccionales para sellecionar.
Use las teclas direccionales para sellecionar.
Use las teclas direccionales para sellecionar.

espero su ayuda
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

problema con menu en pantalla(se superponen las lineas)

Publicado por ramon (2158 intervenciones) el 21/11/2012 18:53:02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{A ver si ayuda}
 
program menus;
 uses
    crt;
 var
    tec : char;
  procedure marcador(x, y : integer; act : boolean);
  begin
      if act = true then
      begin
      gotoxy(x - 1,y - 1);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
          gotoxy(x - 1,y);write('³');
          gotoxy(x + 20,y);write('³');
      gotoxy(x - 1,y + 1);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
      end
    else
      begin
      gotoxy(x - 1,y - 1);write('                      ');
          gotoxy(x - 1,y);write(' ');
          gotoxy(x + 20,y);write(' ');
      gotoxy(x - 1,y + 1);write('                      ');
      end
  end;
 
  procedure otromenu;
  var
     opci2 : integer;
     termi : boolean;
     x2, y2 : integer;
     pul : char;
  begin
      clrscr;
      termi := false;
      opci2 := 1;
      x2 := 30;
      y2 := 4;
    repeat
      gotoxy(30,2);write('*****  Menu Dos *****');
      gotoxy(30,4);write('Multiplicar');
      gotoxy(30,6);write('Dividir');
      gotoxy(30,8);write('Salir');
      marcador(x2,y2,true);
      gotoxy(30,10);write('  Teclas [ ',chr(24),' ',chr(25),' ] y Enter');
    repeat
      pul := readkey;
      marcador(x2,y2,false);
      if pul = #72 then
      begin
         y2 := y2 - 2;
      if y2 < 4 then
      y2 := 4;
      opci2 := opci2 - 1;
      if opci2 < 1 then
      opci2 := 1;
   end;
   if pul = #80 then
   begin
       y2 := y2 + 2;
      if y2 > 8 then
      y2 := 8;
      opci2 := opci2 + 1;
      if opci2 > 3 then
      opci2 := 3;
   end;
   marcador(x2,y2,true);
   until pul = #13;
  case opci2 of
 1 : begin
         clrscr;
         writeln(' La multiplicacion de 5 * 3 sera = ',5 * 3);
         readkey;
         end;
 2 : begin
         clrscr;
         writeln(' La division de 59 / 7 sera = ',59 / 7:0:2);
         readkey;
         end;
 3 : termi := true;
  end;
   until termi = true;
   clrscr;
  end;
 
  procedure menu;
  var
    opci, x1, y1 : integer;
    sal : boolean;
  begin
     x1 := 4;
     y1 := 3;
     opci := 1;
     sal := false;
     repeat
     clrscr;
     gotoxy(4,1);write('*****  Menu General *****');
     gotoxy(4,3);write('Suma');
     gotoxy(4,5);write('Resta');
     gotoxy(4,7);write('Otro menu');
     gotoxy(4,9);write('Salir');
     marcador(x1,y1,true);
     gotoxy(4,11);write('  Teclas [ ',chr(24),' ',chr(25),' ] y Enter');
   repeat
     tec := readkey;
     marcador(x1,y1,false);
   if tec = #72 then
   begin
      y1 := y1 - 2;
      if y1 < 3 then
      y1 := 3;
      opci := opci - 1;
      if opci < 1 then
      opci := 1;
   end;
   if tec = #80 then
   begin
       y1 := y1 + 2;
      if y1 > 9 then
      y1 := 9;
      opci := opci + 1;
      if opci > 4 then
      opci := 4;
   end;
   marcador(x1,y1,true);
   until tec = #13;
   case opci of
  1 : begin
         clrscr;
         writeln(' La suma de 10 + 34 sera = ',10 + 34);
         readkey;
         end;
  2 : begin
          clrscr;
          writeln(' La resta de 108 - 74 sera = ',108 - 74);
          readkey;
          end;
  3 : otromenu;
  4 : sal := true;
    end;
     until sal = true;
   end;
 
  begin
      clrscr;
      menu;
  end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar

problema con menu en pantalla(se superponen las lineas)

Publicado por juan (2 intervenciones) el 21/11/2012 19:42:47
gracias man son un grande me sirvio un monton me aclaro un monton de dudas,
gracias por tu tiempo un saludo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar