[SOLVED] "Type here" command line prompt

In an old (2016) trial run of Quest, I seem to have managed to stick a greater-than sign (">") there instead. I don't know how. I don't know where. The regular command bar with borders is chosen, no "use cursor instead" box ticked. I've looked to see if it's merely hidden by clever use of colours, but no: it goes away when typing, suggesting it's a complete replacement. I can't even find where in the code editor "type here..." is defined!

Was it part of old standard to be able to pick the filled in text? Can we no longer do this?


It's not in the GUI. It's the value of the template TypeHereLabel.

To change it, you could either override that template (which I think you can only do in full code view, but I could be wrong) by adding: <template name="TypeHereLabel">Your text here</template> after the line <include ref="English.aslx" />.

During the game, you can change it using the following command:

JS.setInterfaceString("TypeHereLabel", "Insert your new label here...")

This will be reset when loading a saved game, as it's only stored in the javascript front end. So if you want your changes to be there when a saved game is restored, you need to put it in the UI Initialisation script, which is run before starting a game and before resuming a saved game. (UI Initialisation script is on the game's "Advanced Scripts" tab, which must first be enabled using a tickbox on the "Features" tab)


Worked beautifully, thank you so much once again.


JS.setInterfaceString can be used in the same way to set the strings: "InventoryLabel", "CompassLabel", "PlacesObjectsLabel", "InButtonLabel", "OutButtonLabel", or "ContinueLabel".

(It also allows you to set "NothingSelectedLabel" and "EmptyListLabel", which I assume are holdovers from a previous version of Quest, because the strings are discarded without being displayed anywhere)


That's really interesting; what's the continue label for? Some kind of "click here to continue" button?


Yes; used by the wait command ("Wait for key press" in the GUI). While waiting, a "Continue..." link replaces the command bar.


Seeing as how it's a string, does that mean that it might possibly be slave to some css, if one wanted to make it, say, center it and blink...


Setting CSS for it should work fine. Here's the link:

<a id="endWaitLink" onclick="endWait();" class="cmdlink" style="display: none">Continue...</a>

setInterfaceString sets the HTML inside it to the provided string; you should be able to do anything you want either by passing HTML, or setting CSS rules for #endWaitLink.


Been poking around a little and can't figure out where an <a> link should best go. It doesn't work inside or outside of the <game> tag. Just using the setInterfaceString works fine of course, as my original query, but perhaps I misunderstood you when you said you could pass html directly to the string? As it counts as nesting xml.


The <a> tag I passed is part of the initial user interface; you don't need to put it anywhere.

The setInterfaceString function inserts its parameter as the contents of that element (replacing the default "Continue..." in that line). So you can always include <b> or whatever; but including another <a> is probably a bad idea as you'd be putting two anchors inside each other, and different browsers have different behaviour when you do that.

If you want to apply extra CSS to that element, you would do something like:

JS.setCss("#endWaitLink", "text-decoration:underline")

or whatever changes you want to make to it.


Thanks mate, that did the trick, and for explaining the differences: I get it now! It didn't want to take an alignment, but that I can understand since it's probably part of a div or something similar. This gives ample room to mess around with stuff, so I really appreciate you taking your time for my sake :>

(As an aside, how have you gotten to know this much info about the inner workings of Quest? Dev? Long time user?)


I think I've been poking around in Quest for about 2 years now. I probably don't know that much, but I'd like to think I'm pretty good at finding stuff. I've skim-read most of the script in the "Core" libraries while trying to find answers to people's questions, so I think I've got a pretty good handle on the structure of most of them. I've got shortcuts saved to playercore.htm and playercore.js because most of the time questions about the UI can be answered by looking in those two files. (They make up the "front end" of Quest. The desktop player is just an embedded copy of Chromium displaying a single page, with the Quest backend calling javascript functions on it)


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

Support

Forums