Hide Command Bar but still allow Continue [Solved]

I want to hide the command bar during game initialisation but still use WAIT operations to break up long passages of text. I know that request (Hide, "Command") hides the command bar but also seems to hide the CONTINUE associated with WAIT. Suggestions?


Here's the command bar HTML:

<div id="txtCommandSpacer"></div>
<div id="txtCommandDiv" style="display: block;">
            <span id="txtCommandPrompt"></span>
            <input type="text" x-webkit-speech="" id="txtCommand" onkeydown="return commandKey(event);" placeholder="Type here..." autofocus="" style="font-family: Georgia, serif; color: black; font-size: 12pt; background: white; width: 655px;">
            <a id="endWaitLink" onclick="endWait();" class="cmdlink" style="display: none;">Continue...</a>
</div>

So… if you hide #txtCommandDiv it will hide both the command bar and the "Continue" link.
If you just hide #txtCommand, it will hide only the input bar.

If you have an input prompt (Such as "==>" or "What now?") appearing to the left of the input bar, that can be hidden by hiding #txtCommandDiv or #txtCommandPrompt. I guess that the default code hides the whole div so that it can hide both the prompt and the input bar itself.

So, in Quest you probably want something like:

  • JS.uiHide("#txtCommand")
    and
  • JS.uiShow("#txtCommand")

If you have a prompt when the command bar is visible, you'd instead use:

  • JS.uiHide("#txtCommand,#txtCommandPrompt")
    and
  • JS.uiShow("#txtCommand,#txtCommandPrompt")

(Note: The request statement is a leftover from previous versions of the Quest code; it looks like it sticks around as a compatibility method for people who already used it in their scripts, but you should try to avoid it wherever possible)


Quick, correct and comprehensive as always! Many thanks mrangel.


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

Support

Forums