Hide/Show Command Bar Question :)

Hey all :)

I've already checked the UI Walk-through in the Quest Documentation page, but it doesn't explain HOW to hide/show the command bar. I tried...

request (Hide, "Command")
request (Show, "Command")

But I think these are outdated because they threw errors.

I also tried...

game.commandpane = True/False

But that didn't work either.

Could it be...

 commandpane.show = True/False

I know it's probably something simply but I didn't see it in the game.attributes. I found it in the interface options though :O

I would appreciate any and all help :D

Anonynn.


Try:

JS.uiShow("#txtCommandDiv")
JS.uiHide("#txtCommandDiv")

That worked perfectly, except that removed the "press to continue" button as well. Is there anyway to bring back the "continue" without showing the command bar?

Anonynn.


Or is there no way to do one without the other?


Okay, try:

JS.eval("$('#txtCommand').hide()")
JS.eval("$('#txtCommand').show()")

Nope. That didn't do anything.

I'll keep looking through the hidden filter area and see if I can't stumble across anything in the meantime!

We shall figure this out! :D

Anonynn.


I found...

Name: EditorGameShowCommandPane
Text: Show a command pane (use JS.setCommands to set)

AND

Name: EditorGameShowcommand
Text: Show command bar

Not much help there though.


I just created a couple of functions using that, and they work fine (though the command bar reappears after continue is pressed).

  <function name="HideCommandBar">
    JS.eval ("$('#txtCommand').hide()")
  </function>
  <function name="ShowCommandBar">
    JS.eval ("$('#txtCommand').show()")
  </function>

Yeah, strange. I put this...

HideCommandBar

(the standard function way) in the start script right before loading the game-title function but it doesn't hide the command bar at all.

I'll try it in a few more places.

Anonynn.


UPDATE:

Yeah, I tried the function in a couple of other places as well but nothing happens :O

Anonynn.


In my game, when the player looks at a NPC or monster, I created a function called 'ViewObjectSceen'. Instead of writing the same script over and over. The function is called from the objects description script when a player 'looks' at an NPC or monster.

The function contains:

request (Hide, "Command")
request (Hide, "Panes")
SetFontSize (15)
ClearScreen
JS.setGamePadding (100, 100, 50, 0)

This hides the Command box and panes correctly. I have been using this function since 5.5 and am now using 5.8

I then print whatever info with that set up.

Then I place a command hyper-link at the bottom of the NPC's description script.
The command calls this function to return to normal game play.

SetFontSize (16)
request (Show, "Command")
request (Show, "Panes")
JS.setGamePadding (250, 25, 25, 25)
ClearScreen
ShowRoomDescription

This effectively stops the player from any input other than the hyper-link during the viewing of the NPC description, so I do not know if the 'hide' will maintain if other input is allowed.

I've been doing this to avoid a bunch of screen scrolling...Gives a clean 'snap to' shot.

Preview DevMode


Weirdly enough...

request (Hide, "Command")
request (Hide, "Panes")

These work now but didn't before. I think because I tried them on the start script. Instead, I moved it to a function I use first and that seemed to do the trick. I appreciate all the weigh-ins and fixes everyone. Thank you!

Anonynn.


Sometimes...you just have to hold your mouth right to get things to work.


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

Support

Forums