Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change command textfield style. #857

Closed
ThePix opened this issue Apr 20, 2016 · 2 comments
Closed

Cannot change command textfield style. #857

ThePix opened this issue Apr 20, 2016 · 2 comments

Comments

@ThePix
Copy link
Contributor

ThePix commented Apr 20, 2016

Changes to the command textfield are ignored when done in either game.start or InitUserInterfacet. It does work in a room script however. I would guess either some is setting it back to white after game.start and InitUserInterface have both done, or the text field is only added after game.start and InitUserInterface have both done, and they fail to do anything as it just does not exist when trying to set it.

See thread.
http://forum.textadventures.co.uk/viewtopic.php?f=10&t=6256&p=42426#p42426

@alexwarren
Copy link
Contributor

If you can you attach a sample that demonstrates the problem, I'll reopen this and take a look.

@ThePix
Copy link
Contributor Author

ThePix commented Aug 6, 2016

Here is a sample game. It has a custom command, RED, which will change the background of the textfield, while game.start and InitUserInterface fail to do so.

<!--Saved by Quest 5.6.5783.24153-->
<asl version="550">
  <include ref="English.aslx" />
  <include ref="Core.aslx" />
  <game name="textfield">
    <gameid>dd75373d-1526-4fa6-8bc8-c2953f3d6675</gameid>
    <version>1.0</version>
    <firstpublished>2016</firstpublished>
    <start type="script">
      JS.eval ("$('#txtCommand').css('background-color', 'red')")
    </start>
  </game>
  <object name="room">
    <inherit name="editor_room" />
    <object name="player">
      <inherit name="editor_object" />
      <inherit name="editor_player" />
    </object>
  </object>
  <command name="red">
    <pattern>red</pattern>
    <script>
      JS.eval ("$('#txtCommand').css('background-color', 'red')")
    </script>
  </command>
  <function name="InitUserInterface">
    JS.eval ("$('#txtCommand').css('background-color', 'red')")
  </function>
</asl>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants