Help! Need to suppress [More...] prompt!
Posted: Sat Jun 11, 2005 6:19 pm
Here's my dilemma. I need to stop the "[More...]" prompt in a certain situation. Basically, I have written an in-line menu -- kind of like menu() from hugolib.h, except that it works with the current proportional font, and doesn't require clearing the screen before or after. It works, for the most part. I had to write a "LocateLine" routine, so that I could position the pointer at the start of row based on the proportional font (locate() works only on the fixed-width foth). I did this by using display.cursor_row, locating to the top, and then printing however many blanks "" needed to reach the right row. The Windows port of Hugo seems a little unreliable in returning the right cursor_row sometimes, but I can work around that.
The bigger problem is, because of how I need to do LocateLine(), scrolling is a problem. It's not a problem until after the user makes a choice, though. I get the "[More]..." prompt. I want to suppress it, but for the life of me, I can't figure out a way how.
I've gone so far as to look in the Hugo source code. I've checked out hemisc.c, looking for a command I might have missed, or even a work-around. I've found basically two ways to supress the prompt. First, the "full" variable gets reset whenever the command prompt is shown. I'm not showing the command prompt for my menu, since I need "pause" to allow for hotkeys. Second, if command playback is in effect *and* the user pushed "+" at the last "[more...]" prompt, then the rest of the commands will scroll through without stopping. This, I figured out from looking at hemisc.c, and sure enough, it works.
However, I don't see any other way to do it.
So, I'd like to request it as a new feature. Could the "full" linecount variable be reset when using the Hugo "pause" command, as well? Or, could a "system" command be added, that can be used to reset "full" or else to turn pausing on and off? The latter would probably be less likely to break existing games, since it could just be used as needed.
I can work around this problem by scrolling up the display a few extra lines before I draw my menu. Then, after the user's prompt, it doesn't have to scroll again. But, it doesn't look as slick that way, plus it's hard to know how much text is going to be dumped out after the user makes a choice. Alternately, I could always just clear the display window first, but I really wanted the menu to work in the normal flow of text. And it almost does. :)
If this kind of option can't be added to Hugo, does anybody have any other ideas for supressing the "[more...]" prompt? It doesn't appear to be possible.
The bigger problem is, because of how I need to do LocateLine(), scrolling is a problem. It's not a problem until after the user makes a choice, though. I get the "[More]..." prompt. I want to suppress it, but for the life of me, I can't figure out a way how.
I've gone so far as to look in the Hugo source code. I've checked out hemisc.c, looking for a command I might have missed, or even a work-around. I've found basically two ways to supress the prompt. First, the "full" variable gets reset whenever the command prompt is shown. I'm not showing the command prompt for my menu, since I need "pause" to allow for hotkeys. Second, if command playback is in effect *and* the user pushed "+" at the last "[more...]" prompt, then the rest of the commands will scroll through without stopping. This, I figured out from looking at hemisc.c, and sure enough, it works.
However, I don't see any other way to do it.
So, I'd like to request it as a new feature. Could the "full" linecount variable be reset when using the Hugo "pause" command, as well? Or, could a "system" command be added, that can be used to reset "full" or else to turn pausing on and off? The latter would probably be less likely to break existing games, since it could just be used as needed.
I can work around this problem by scrolling up the display a few extra lines before I draw my menu. Then, after the user's prompt, it doesn't have to scroll again. But, it doesn't look as slick that way, plus it's hard to know how much text is going to be dumped out after the user makes a choice. Alternately, I could always just clear the display window first, but I really wanted the menu to work in the normal flow of text. And it almost does. :)
If this kind of option can't be added to Hugo, does anybody have any other ideas for supressing the "[more...]" prompt? It doesn't appear to be possible.