Disabling and Enabling display features in game?

Pykrete
Hey, got some questions regarding turning on and off certain features on the fly. I apologize if this is something glaringly obvious that I've glossed over.

The specific examples I have in mind are as follows;
1. I don't want to use the Command Bar at all, but it's required if I want the player to be able to input things for the purpose of 'Wait For Player Input', such as naming the character. Is there a function to turn it on and off? Or is it possible for me to make one on my end? As it stands, my options are leave the command bar on, when it's not really being used for anything, or turn it off but lose the ability to have the player name things.
2. I'm using the map system, but it would be nice to be able to turn it off during encounters with npcs and enemies, as it would make things a lot cleaner; during these encounters, the map is irrelevant information that takes up a fair portion of the window.
3. I'm drumming up a system of self-contained menus for encounters and the like; in addition to disabling the map window, it would also be useful to just disable the interface entirely. Get rid of the compass, for example, which would save me the bother of checking to see which exits are within the player's reach, locking them, then reopening them upon the end of the encounter, as I don't want players moving rooms mid fight. Getting rid of the inventory pane would prevent them from using an item and messing up the function chain I'm using for the encounter.

That's about all I can think of for now, at any rate. Multiple questions, but all of the same theme. I'm really hoping this is possible, as it'll save a lot of headache. In summary - is it possible to turn the Command Bar, Compass, Places and Objects and Inventory UI's on and off through functions during gameplay?

OurJud
You can hide the command bar, if that's any use. The player will still be able to input, but all you've have on screen is a flashing vertical cursor instead of the ugly oblong box.

Only thing is, the online player seems to have a slight issue which means the command box will reappear when you resume a saved game.

HegemonKhan
to have the map~grid feature on:

<game name="xxx">
// this (line directly below) is the shortened form for a Boolean Attribute:
<gridmap />
// Long form is: <gridmap type="boolean">true</gridmap>
</game>


to have the map~grid feature off:

<game name="xxx">
<gridmap type="boolean">false<gridmap/>
</game>


and in~for scripting, here's the code lines:

game.gridmap = false // 'off' state
game.gridmap = true // 'on' state

Pykrete
OurJud wrote:You can hide the command bar, if that's any use. The player will still be able to input, but all you've have on screen is a flashing vertical cursor instead of the ugly oblong box.

Only thing is, the online player seems to have a slight issue which means the command box will reappear when you resume a saved game.


That's an alternative, I guess. Not a very good one if this online player issue is still a thing, mind.

HegemonKhan wrote:to have the map~grid feature on:
and in~for scripting, here's the code lines:

game.gridmap = false // 'off' state
game.gridmap = true // 'on' state


I just tried this, and it doesn't achieve what I want at all, unfortunately. In fact, it seems to be pretty useless - turning off the gridmap via this method just prevents the map from getting any new information sent to it, and the window remains at the top of screen frozen.

The Pixie
Turn the command line on and off with these:
request (Show, "Command")
request (Hide, "Command")

For the grid, you will need to use JavaScript to change the CSS/HTML:
JS.eval ("$('#gridPanel').css('display', 'block')")
JS.eval ("$('#gridPanel').css('display', 'none')")

Pykrete
The Pixie wrote:Turn the command line on and off with these:
request (Show, "Command")
request (Hide, "Command")

For the grid, you will need to use JavaScript to change the CSS/HTML:
JS.eval ("$('#gridPanel').css('display', 'block')")
JS.eval ("$('#gridPanel').css('display', 'none')")


Aha, that javascript works just fine for the map. Slightly unfortunate that it doesn't allow the text to fill the space left behind, but at least it's out of the way and no longer demanding attention.

Can I do something similar for the UI to the right? A way to turn it all off/hide it that allows me to turn it back on afterwards. Alternately, if it's possible to turn them on/off one by one, it would be pretty handy to show a different status window while I hide the others; one that displays the players stats against the opponents.

Still, 2 down, 1 to go!

The Pixie
All the panes at once:
request (Show, "Panes")
request (Hide, "Panes")


Remove just the compass rose (swap "none" with "block" to show it again):
JS.eval ("$('#compassLabel').css('display', 'none')")
JS.eval ("$('#compassAccordion').css('display', 'none')")


Instead of compass, you can use:
statusVars
inventory
placesObjects

See also:
viewtopic.php?f=18&t=5111

Pykrete
Excellent, thank you. My apologies, I must have missed that topic.

HegemonKhan
sorry about that, I just assumed that the way of turning the feature on and off worked, which it didn't... Thanks to Pixie for getting you the correct way of doing it, via JS.

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

Support

Forums