text command alignment problem after using showmenu()

Satoh
I have a ShowMenu function with a fairly long list(about 9 choices)
After making a choice, the text command box doesn't fully retract to its original position before the menu was drawn.

Is there a better way to present a finite number of options without having to manually text parse each one for validity?
Or a way to fix the command bar position?

I'm trying to avoid a lot of reckless screen clearing.

EDIT:
I added this to function HideOutputSection (the function that gets called to removed completed menus)
JS.HideOutputSection (name)
SetTimeout (1) {
JS.eval ("$('#divOutput').css('min-height','0px');")
}


And that seems to work as a duct-tape fix, but I'm not sure if it could cause more serious issues later, since I'm directly modifying CSS properties, instead of altering the behavior of the menu...
(I haven't found where the HideOutputSection javascript is, so I don't know how it actually works...)

jaynabonne
The JS version of HideOutputSection looks like this (taken from player.js in Quest 5.5.1):

function HideOutputSection(name) {
EndOutputSection(name);
$("." + name + " a").attr("onclick", "");
setTimeout(function() {
$("." + name).hide(250, function () { $(this).remove(); });
}, 250);
}

(You can get all of the player code and more by downloading the source from the Quest GIT repository. I would recommend it, especially if you're code savvy. It's handy to be able to search for things.)

Basically all the code does is hide the div. It doesn't adjust the overall output div height to account for the lost area. (I used to be annoyed by that behavior, but I came to terms with it, somewhat, as a design decision. A large gap vs the text scrolling back down to close the gap...)

It looks like you have a solution, so I'm not sure if I can help further. But let me know if I can.

Satoh
"Looks like" is the operative term here. It seems to work ok, but I haven't tested it thoroughly.
The problem, I have discovered, was that the output div from the previous line of text, gets its min-height attribute inflated for each menu item, but once those are hidden, nothing changes the attribute back to normal.

It appears as though settingit to 0px is ok, (its min-height, after all, not max-height).
I hesitate to call this resolved until more testing is done...

Thanks for the reply. I'll look through those source files.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums