Some some side-panel panes but not others

psymann
02 Apr 2013, 11:19Hello all,
On the right, I see a side-panel with various panes:
- Inventory
- Places and Objects
- Compass
I quite like the Inventory one.
But I don't like the Places and Objects one.
So I want to turn off the Places and Objects one, but keep the Inventory one. Is that possible?
All I can see is the "Game -> Display -> Show panes" option which is just a boolean tick-box, ie show all, or show none. If need be, I'll turn it to show none, and just force my user to keep typing "inv" every few minutes to remember what he's carrying. But is there a clever codey way to show just the Inventory one?
Thank you for your continued support!
psymann
On the right, I see a side-panel with various panes:
- Inventory
- Places and Objects
- Compass
I quite like the Inventory one.
But I don't like the Places and Objects one.
So I want to turn off the Places and Objects one, but keep the Inventory one. Is that possible?
All I can see is the "Game -> Display -> Show panes" option which is just a boolean tick-box, ie show all, or show none. If need be, I'll turn it to show none, and just force my user to keep typing "inv" every few minutes to remember what he's carrying. But is there a clever codey way to show just the Inventory one?
Thank you for your continued support!

psymann

jaynabonne
02 Apr 2013, 12:02Add these two lines to your game start script (add one if you don't have one!)
JS.eval("$('#placesObjectsLabel').hide();")
JS.eval("$('#placesObjectsAccordian').hide();")

psymann
02 Apr 2013, 12:23Ooh, nice, that works... though I don't understand what it's doing since the code is a bit beyond me.
If I wanted to hide the Compass one as well, how would that look?
Or if I wanted to hide just the Inventory one?
If I wanted to hide the Compass one as well, how would that look?
Or if I wanted to hide just the Inventory one?

psymann
02 Apr 2013, 12:27Actually, no, that doesn't quite work...
It removes the Title "Places and Objects", but leaves behind the actual list of all the places and objects.
It removes the Title "Places and Objects", but leaves behind the actual list of all the places and objects.

jaynabonne
02 Apr 2013, 12:29<deleted, since it's nonsense...>

jaynabonne
02 Apr 2013, 12:30psymann wrote:Actually, no, that doesn't quite work...
It removes the Title "Places and Objects", but leaves behind the actual list of all the places and objects.
Darn. Ok, let me check.

jaynabonne
02 Apr 2013, 12:37All I can figure is that Quest must be turning it back on again. Since it comes and goes, that makes sense. I don't have the latest cs/vb code, so I can't say if there is a way to work around that.
Maybe there is no way with the current version.
Maybe there is no way with the current version.

sonic102
03 Apr 2013, 02:31HTML editing maybe? Or try putting Jay's code in a turn script?

jaynabonne
03 Apr 2013, 08:24I tried the turn script, and it didn't work. Quest must be updating the panes after the turn scripts fire.
HegemonKhan
03 Apr 2013, 23:20I thought I saw (and read) some thread with posts on how to maybe at least create a pane and~or maybe also hide a pane, so try looking or searching through or at the various threads for such posts. I don't know though where I remember seeing it, 
maybe it was a library too, so try looking or searching for libraries that MIGHT have been made on doing what you want with the panes.

maybe it was a library too, so try looking or searching for libraries that MIGHT have been made on doing what you want with the panes.
sonic102
04 Apr 2013, 02:25Then HTML Editing is all we can do.

psymann
04 Apr 2013, 09:44I think then until Quest 5.x turns up with an easier way to do it, I'll just stick to turning the whole lot off, and getting people to type "inv" when they want to see what they're carrying. Worked well enough for people in the 1980s 

sonic102
05 Apr 2013, 02:29That is what non-Questers do too.

jaynabonne
06 Apr 2013, 14:49I hate it when I have the solution right under my nose, but I refuse to see for some reason. It turns out this works, but I don't know why (or, rather, why mine didn't).
The code I had offered before was based on a .js file Alex had given Scott before for hiding panes. I tried to convert it into ASLX "JS" calls, and it didn't work. But it didn't register that it should have (or that it worked otherwise).
At any rate (rambling aside), if you include the attached .js file in your project, it will turn off the "places objects" pane as well as the compass. If you want one or the other, delete the appropriate section from the .js file.
[Tutorial: to include a .js file, copy into your project folder - the folder where your .aslx file is. Then from the menu choose Add / Advanced / Javascript. When you get to the Javascript page, click on the FIlename dropdown. The .js file should be in the list. Select it, and it will be included.)
(Note the .js file is zipped up, since the forum won't allow .js attachments.)
If you look at the file and the HTML structure, you'll see why I thought it should have worked. Perhaps it's a question of *when* things run more than what. (The "next" element from the label is the accordian.)
The code is:
The code I had offered before was based on a .js file Alex had given Scott before for hiding panes. I tried to convert it into ASLX "JS" calls, and it didn't work. But it didn't register that it should have (or that it worked otherwise).
At any rate (rambling aside), if you include the attached .js file in your project, it will turn off the "places objects" pane as well as the compass. If you want one or the other, delete the appropriate section from the .js file.
[Tutorial: to include a .js file, copy into your project folder - the folder where your .aslx file is. Then from the menu choose Add / Advanced / Javascript. When you get to the Javascript page, click on the FIlename dropdown. The .js file should be in the list. Select it, and it will be included.)
(Note the .js file is zipped up, since the forum won't allow .js attachments.)
If you look at the file and the HTML structure, you'll see why I thought it should have worked. Perhaps it's a question of *when* things run more than what. (The "next" element from the label is the accordian.)
The code is:
$(function() {
var $placesObjectsLabel = $("#placesObjectsLabel");
var $placesObjects = $placesObjectsLabel.next();
$placesObjectsLabel.hide();
$placesObjects.hide();
});
$(function() {
var $compassLabel = $("#compassLabel");
var $compass = $compassLabel.next();
$compassLabel.hide();
$compass.hide();
});

psymann
27 Apr 2013, 16:10Whoo, that works, thanks 
Now it's in my program, when I eventually finish and publish it, it'll do the same for other people, presumably? I won't have to supply them with the javascript file as well?

Now it's in my program, when I eventually finish and publish it, it'll do the same for other people, presumably? I won't have to supply them with the javascript file as well?

jaynabonne
27 Apr 2013, 18:11The JS file will be included when you publish the game, as it does for images, etc. (all lumped into the .quest file). It won't need to be a separate file, but you do need to keep the external JS file in your project since it's referenced. You can also modify the .JS file at will and the changes will be reflected immediately in the game.