I have created a menu with the arrow keys to move up or down and then enter to select an option, which works as expected.
Now I want to create a help screen so that the arrow keys will move to the bottom of the screen and when it reaches that point, if there is more text it will scroll up the screen, and if needed one can move back up. Unsure of how to have the top part of the text screen scroll off when it reaches new text past the bottom.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
is this the case?
(1) option 1
(2) option 2
(3) option 3
and that you have some kind of scrollbar or maybe an arrow...
each keyread you would have to reprint it all if you want to add an (4) option 4 out of sight
you would need a variable AddToIndex : integer; or something.
for c:=1 to MAX_VISIBLE_CHOICES do begin
gotoxy (X_START, Y_START+c-1);
write (Choice[c+AddToIndex]);
(* Here you might wanna space away 'before' letters *)
end;
with AddToIndex set to 0 (zero) at first.
then you have to do an if statement when your original index is all down (higher number) and the key for down has been pressed to increment the AddToIndex variable.
If all of this doesn't help, you could cut out a square see through shape in a piece of paper and write down your menu choices on another piece of paper and start making some notes.
Never underestimate the force (of jotting something down).
Thanks for your time,
Bert Le Nerd.
Belgium.