As some of you may be aware, I have been trying, ever since uploading my first test game over a year ago, to prevent the border around the parser command box from displaying.
The problem occurs when playing the game online, in that the game won't fetch the CSS rule which hides the parser command box, when the game is resumed from a save point.
Back when this was originally discussed, Jay finally came to the conclusion that it was a bug with the online emulator, so over the last few weeks I've had a ticket running on Github and Alex has said that my CSS to hide the parser command box has to go in the IntInterface in order for it to work on resume.
Now, I've found this in Library Elements, but have no idea where the CSS call needs to go.
Here's a breakdown:
In the game's code I have the following CSS block, somewhere near the top:
<css><![CDATA[
<style type="text/css">
body {
line-height: 1.2em;
}
div#txtCommandDiv {
border:none;
background: no-repeat;
font-size:10px;
font-family:'Trebuchet MS', Helvetica, sans-serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:10px;
margin:0;
padding:0;
max-width: 1000px;
}
</style>
And then right at the very bottom:
<function name="InitUserInterface"><![CDATA[
JS.eval ("$('#txtCommandDiv').prepend('> ')")
request (SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr (game.css)
JS.JS.eval ("$('#status').hide();")
]]></function>
Then, in the UI, under Game >> Script (tab) I have the following JS running as a Start Script:
JS.JS.eval ("getCSSRule('a.cmdlink').style.color='#000000'")
Finally, this is the entire script code for the IntInterface - which is where Alex says I need to add the CSS in order for it to hid the parser command box on resume of a save:
if (game.setcustomwidth) {
JS.setGameWidth (game.customwidth)
}
else {
}
if (not game.showborder) {
JS.hideBorder ()
}
if (game.setcustompadding) {
JS.setGamePadding (game.custompaddingtop, game.custompaddingbottom, game.custompaddingleft, game.custompaddingright)
}
if (game.externalstylesheets <> null) {
foreach (stylesheet, game.externalstylesheets) {
JS.addExternalStylesheet (stylesheet)
}
}
if (game.setbackgroundopacity) {
SetBackgroundOpacity (game.backgroundopacity)
}
request (Background, game.defaultbackground)
request (Foreground, game.defaultforeground)
request (LinkForeground, game.defaultlinkforeground)
if (LengthOf(game.backgroundimage) > 0) {
SetBackgroundImage (game.backgroundimage)
}
request (SetCompassDirections, Join(game.compassdirections, ";"))
request (SetInterfaceString, "InventoryLabel=Inventory")
request (SetInterfaceString, "StatusLabel=Status")
request (SetInterfaceString, "PlacesObjectsLabel=Places and Objects")
request (SetInterfaceString, "CompassLabel=Compass")
request (SetInterfaceString, "InButtonLabel=in")
request (SetInterfaceString, "OutButtonLabel=out")
request (SetInterfaceString, "EmptyListLabel=(empty)")
request (SetInterfaceString, "NothingSelectedLabel=(nothing selected)")
request (SetInterfaceString, "TypeHereLabel=Type here...")
request (SetInterfaceString, "ContinueLabel=")
JS.SetMenuBackground (game.menubackground)
JS.SetMenuForeground (game.menuforeground)
JS.SetMenuHoverBackground (game.menuhoverbackground)
JS.SetMenuHoverForeground (game.menuhoverforeground)
JS.SetMenuFontName (game.menufont)
JS.SetMenuFontSize (game.menufontsize + "pt")
if (not game.underlinehyperlinks) {
JS.TurnOffHyperlinksUnderline ()
}
if (game.showpanes) {
request (Show, "Panes")
}
else {
request (Hide, "Panes")
}
if (game.showcommandbar) {
request (Show, "Command")
}
else {
request (Hide, "Command")
}
if (game.showlocation) {
request (Show, "Location")
}
else {
request (Hide, "Location")
}
if (HasString(game, "panelcontents")) {
SetFramePicture (game.panelcontents)
}
if (game.gridmap) {
JS.ShowGrid (game.mapsize)
Grid_SetScale (game.mapscale)
if (game.pov <> null) {
if (game.pov.parent <> null) {
Grid_Redraw
Grid_DrawPlayerInRoom (game.pov.parent)
}
}
}
InitUserInterface
Can someone please explain where it needs to go?