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
Add starting frame to animated_image
#9411
Conversation
@kilbith Thoughts re: the syntax? Personally, I'm indifferent to the syntax changes and the feature seems reasonable enough... It doesn't seem to have many use-cases at the moment, but I assume this will be much more useful when your other proposals start to roll in. |
Dumb question, but wouldn't the colon make more sense as a semi-colon to be consistent with other elements where the texture name is always a distinct parameter? |
Not a dumb question. The answer is probably, but |
Ah, okay that sounds like a solid rationale for the comma. I hadn't thought of the internal workings. Thanks for clarifying. |
I am in favor of commas but |
Ok, I changed the syntax and also moved the parsing code to |
c088313
to
3feedf8
Compare
OK, this PR is now Ready for Review. I added the event, and I added some more use cases to the first post. I hope this gets merged before the next Minetest release so that we aren't stuck with the current |
IIRC, if |
No, not every |
Would it make sense for the format to be |
Closest appears to be these:
|
I guess the benefit of commas is that you can rationalise it at the specification of an entity which is an animated texture, and reuse it in other places |
I personally have no preference on the syntax. Now that I've moved the parsing code to Edit: Actually, yeah, semicolons might be better. |
Two days; I assume there are no objections. I've changed the commas to semicolons |
looks good apart from this, I hope to merge this tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works
6cf4896
to
e2db130
Compare
Ready for merge at any time. |
e2db130
to
ab054a7
Compare
ab054a7
to
00ca17b
Compare
👍 Changes look good. Thanks. |
This PR does the following to
animated_image
:name
parameter.animated_image[<X>,<Y>;<W>,<H>;<name>;<texture name>,<frame count>,<frame duration>;<frame start>]
. Notice the two new parameters and the change from a colon to a comma.This PR is useful because images can be stopped and restarted at any specific point. For instance, a slide show that automatically goes through the images slowly, but buttons can be used to go back to previous images. Or a primitive soundless video with pause, play, and a scrollbar for video position. This can also be used to place specific images from spritesheets in multiple places on the formspec. So, many different applications.
To do
This PR is Ready for Review.
How to test
Use the updated Minimal formspec. The animated images have been changed to numbers to show which frame is currently shown better. The
Current Number
buttons will send the index of the animated image to the right of them to the chat.