Trying to change the foreground of the command bar... #1501
-
Howdy, I'm attempting to change the color of the foreground used by the command bar to lawngreen. Some stylings I've applied work fine, but the foreground has not. I've dug into the ResetCommandBarFormat function and messed with it, and also tested some changes in the initialization script, but nothing works...I've listed it here...there are a couple of commented out sections that adjust the stylings, but just because they didn't work really, they were more for styling it a different way. Any help would be much appreciated. Thanks! code: // CommandPrompt ("hide") |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello. =) https://archive.textadventures.co.uk/forum/quest/topic/4211.html
Copy it into your game file, then comment out the line that calls Some of that stuff needs to be applied to <!--Saved by Quest 5.9.9166.36226-->
<asl version="580">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Leave My Command Bar Style ALONE!">
<gameid>9925b7a1-0535-4f04-b345-bb658f91dea3</gameid>
<version>1.0</version>
<firstpublished>2025</firstpublished>
<start type="script"><![CDATA[
JS.eval ("var el = document.getElementById('txtCommand'); el.style.color = 'forestgreen'; $('head').append('<style>#txtCommand::-webkit-input-placeholder{color:forestgreen;}#txtCommand:-moz-placeholder{color:forestgreen;}#txtCommand::-moz-placeholder{color:forestgreen;}#txtCommand:-ms-input-placeholder{color:forestgreen;}#txtCommand::placeholder{color:forestgreen;}</style>');")
JS.eval ("$('#txtCommand').css({'color':'lawngreen','font-family':'\"Press Start 2P\", monospace','font-size':'8pt'});")
JS.eval ("$('#txtCommandDiv').css({'display':'inline-block','vertical-align':'middle','white-space':'nowrap'});$('#txtCommand').css({'display':'inline-block','vertical-align':'middle','white-space':'nowrap'});")
JS.eval ("$('#txtCommandDiv > input').css({'border':'ridge lawngreen 1px','border-radius':'9px','color':'lawngreen','outline':'none','box-shadow':'none'})")
]]></start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<function name="OutputTextRaw" parameters="text"><![CDATA[
format = GetCurrentTextFormat("")
JS.addText ("<span style=\"" + format + "\">" + text + "</span><br/>")
if (GetString(game, "commandbarformat") <> format) {
// ResetCommandBarFormat
}
RequestSpeak (text)
]]></function>
</asl> I changed a few things in there while trying to make different things work, but I'm sure you'll see what's different and be able to make it do what you want now. One thing was it didn't like |
Beta Was this translation helpful? Give feedback.
Hello. =)
https://archive.textadventures.co.uk/forum/quest/topic/4211.html
OutputTextRaw
Copy it into your game file, then comment out the line that calls
ResetCommandBarFormat
.Some of that stuff needs to be applied to
#txtCommandDiv > input
for it to do anything.