by Merk » Wed Oct 26, 2005 3:07 pm
Ah, that makes sense.
Yes, the "[More]" prompt. Well, what happens is, I have written a menu that (a) uses a proportional font and (b) clears itself when done, then prints just the option selected. I guess the easy way to see it would be to playback one of the Distress scripts (see the walkthrough) up to the point where the first "touch" is shown. At that point, it's using my menu. You can actually see where the "[More]" prompt appears, if the printed text is too long.
The reason is, I have to know what line I'm on, so I can back up, print blank lines, and then print the selected option. Because the screen may already be full, basically every line printed is going to scroll up one (when the options are shown). To make it work, I print a number of blank lines first. I can't reliably "locate" in a proportional font, so I location 1,1 and then print nothing until I reach the right point. Hmmm... actually, a demo program and the source might be easier. I'll try to email you a demo that might make it make more sense.
In a nutshell, printing blank lines and then backing up works fine. I can clear the menu and then print more text, as long as what I print doesn't also reach the bottom of the screen. It's because a >prompt isn't shown, so Hugo doesn't reset the line counter. It's not a bug in Hugo -- I spent some time looking at the C source to figure out why this was happening -- it's doing exactly what it's supposed to, but for my purposes, I'd like to reset the line counter at the same time I clear the menu and start printing more text.
Ah, that makes sense.
Yes, the "[More]" prompt. Well, what happens is, I have written a menu that (a) uses a proportional font and (b) clears itself when done, then prints just the option selected. I guess the easy way to see it would be to playback one of the Distress scripts (see the walkthrough) up to the point where the first "touch" is shown. At that point, it's using my menu. You can actually see where the "[More]" prompt appears, if the printed text is too long.
The reason is, I have to know what line I'm on, so I can back up, print blank lines, and then print the selected option. Because the screen may already be full, basically every line printed is going to scroll up one (when the options are shown). To make it work, I print a number of blank lines first. I can't reliably "locate" in a proportional font, so I location 1,1 and then print nothing until I reach the right point. Hmmm... actually, a demo program and the source might be easier. I'll try to email you a demo that might make it make more sense.
In a nutshell, printing blank lines and then backing up works fine. I can clear the menu and then print more text, as long as what I print doesn't also reach the bottom of the screen. It's because a >prompt isn't shown, so Hugo doesn't reset the line counter. It's not a bug in Hugo -- I spent some time looking at the C source to figure out why this was happening -- it's doing exactly what it's supposed to, but for my purposes, I'd like to reset the line counter at the same time I clear the menu and start printing more text.