Hide Command Bar but still allow Continue [Solved]
![](https://i.imgur.com/8BcaZCyb.png)
DavyB
24 Nov 2023, 11:14I 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?
mrangel
24 Nov 2023, 11:54Here'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")
andJS.uiShow("#txtCommand")
If you have a prompt when the command bar is visible, you'd instead use:
JS.uiHide("#txtCommand,#txtCommandPrompt")
andJS.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)
![](https://i.imgur.com/8BcaZCyb.png)
DavyB
24 Nov 2023, 13:36Quick, correct and comprehensive as always! Many thanks mrangel.