2016-01-10

Hiding command bar

1. Go to game code and add the following after <firstpublished>2016</firstpublished>

Code:

<css><![CDATA[

<style type="text/css">

div#txtCommandDiv {
border: none;
background: no-repeat;
}
input#txtCommand {
outline:none;
border: none;
margin:0;
padding:0;
max-width: 1000px;
}
#status { display: none !important; visibility: hidden !important; }

</style>
]]></css>

2. Scroll right to bottom of code and immediately before </asl> add:

Code:

<function name="ClearScreen">
request (ClearScreen, "")
OutputTextNoBr (game.css)
</function>
<function name="InitUserInterface"><![CDATA[
JS.setCommandBarStyle (GetCurrentTextFormat("") + ";border:" + game.defaultbackground)
JS.eval ("$('#status').hide();")
JS.SetBackgroundCol ("black")
JS.eval ("$('#txtCommandDiv').prepend('> ')")
JS.OutputTextNoBr (game.css)
OutputTextNoBr (game.css)
request (SetInterfaceString, "TypeHereLabel=")
if (GetBoolean(game, "inprogress")) {
}
else {
game.inprogress = true
}
]]></function>
<function name="HideCommandBar">
request (Hide, "Command")
</function>
<function name="ShowCommandBar">
request (Show, "Command")
</function>

NB: The last two HideCommandBar functions here, are in case you want to hide the flashing parser/cursor while the intro plays. If you do, just call a Function script at the start of your intro and call it HideCommandBar (Just don't forget to unhide it at the end, when the game starts, by calling a Function again and calling it ShowCommandBar).

3. Back in the UI, go Game >> Script >> click the code view in Start Script and add:

Code:

JS.eval ("getCSSRule('a.cmdlink').style.color='#000000'")
JS.setCommandBarStyle (GetCurrentTextFormat("") + ";border:" + game.defaultbackground)

Finally I suggest you download and install the retrostyle.aslx library file if all the above fails. I'm not altogether sure what the retrostyle library does, but it wasn't until I added it (along with all the above) that I got my game to look how I wanted:
viewtopic.php?f=10&t=4760&start=60#p31475
(further investigation would suggest it includes the ClearScreen CSS hack, so you may or may not need to omit it from the last but one block of code in this post)

I think that's everything, but let me know if not.

Statistics: Posted by OurJud — Sun Jan 10, 2016 5:11 pm

Show more