Advertisement
mixster

mixster

Jan 3rd, 2010
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.14 KB | None | 0 0
  1. var poi: TPoint;
  2.     chooselines, chooselevel: integer;
  3.     go: array of boolean;
  4. procedure MenuDraw(Sender: TObject);
  5. var //mainM: array [0..2] of array [0..2] of boolean;
  6.    // key: array of char;
  7.     i: integer;
  8.     str: string;
  9.     b: Boolean;
  10. begin
  11.   //Draw Menu
  12.   str := 'wasdp' + #13;
  13.   SetArrayLength(b, length(str));
  14.   for i := 1 to Length(str) do
  15.   begin
  16.     if IsKeyDown(str[i]) then
  17.       if go[i] then
  18.     case paused of
  19.       true: begin end;
  20.       false:
  21.         begin
  22.         b := True;
  23.         case i of
  24.           1: if Poi.y > 0 then
  25.                  dec(poi.x);
  26.           2: if Poi.x > 0 then
  27.                  dec(poi.x);
  28.           3: if Poi.y < 3 then
  29.                  inc(poi.x);
  30.           4: if Poi.x < 3 then
  31.                  inc(poi.x);
  32.           6: begin
  33.                  if poi.x < 3 then
  34.                    chooselevel := 3 * poi.y + poi.x;
  35.                  writeln(chooselevel);
  36.              end;
  37.         {end  }         else
  38.             b := False;
  39.           end;
  40.           if b then Writeln('Did something -> ' + IntToStr(i));
  41.         end;
  42.     end;
  43.     go[i] := not IsKeyDown(str[i]);
  44.   end;
  45. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement