Skip to content

Conversation

@BenjaminAmos
Copy link
Contributor

Description

This pull request introduces a new UI widget, called UIAnimatedImage, that allows animated images to be rendered within NUI UI screens. The API is similar to that of UIImage, however, the image binding has been replaced with three separate bindings:
- spritesheet (UITextureRegion) - The spritesheet to use for rendering.
- frameDuration (float) - The number of seconds to elapse between each frame shown
- frames (List<Rectanglei>) - The pixel co-ordinates of each individual frame.

The new UI widget is used to render ship previews on the main menu, enabling support for animated ship sprites to be correctly displayed.

This pull request also changes the rendering logic for the main menu background ships to correctly render animated ship sprites.

Testing

Follow the instructions #723 and verify that the expected behaviour is seen.

Notes

@Du4lity5151
Copy link
Contributor

This fix appears to work mostly correctly, however the animation plays slower in the background if I add the imperialBigElite as a background ship in menuBackgroundShipConfig. If you notice flickering in the siren lights themselves, then it might be normal as the lights flash for one frame and then go off for the next two frames, and repeats at 48 FPS. Otherwise, I did not notice any other issues.

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

Successfully merging this pull request may close these issues.

Spritesheets are displayed instead of animations if not in-game

2 participants