Style command #32
-
I have added the following code for stylesheet changing from the game's demo-disk file. It changes stylesheet by typing stylex. It circles among 3 already given stylesheets. Is there any way to add stylex as a command that takes filename as an argument, so I can add multiple styles. For example 'stylex classic' will change the style to classic.css.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Yeah, that's no problem. Change your function to accept
Now you can call the function, passing the filename as a string:
Finally, you'll need to update your game's commands. Since this function accepts a single argument, you'll need to override
Check out the Commands section of the documentation for more info. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Yeah, that's no problem. Change your function to accept
newName
as an argument like this:Now you can call the function, passing the filename as a string:
Finally, you'll need to update your game's commands. Since this function accepts a single argument, you'll need to override
commands[1]
like this:Check out the Commands section of the documentation for more info.