AnimatedImage can not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-24 5:45 PM
I add three AnimatedImages in a screen, but only one can work normal.
I transplant 'Knight Hits Zombie Game' code and bring my own project, the Zombie and Head AnimatedImages can not play but the Knight AnimatedImage work normal. (The Zombie and Head show the first image but can not show the others).
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 2:21 AM
Hello, I'm using Random function in Utils.hpp but it always return the same value.
class Utils
{
public:
static int randomNumberBetween(int lowest, int highest)
{
#ifdef SIMULATOR
return (int)(lowest + (highest - lowest) * (rand() / (float)RAND_MAX));
#else
uint32_t random = (touchgfx::HAL::getInstance()->getCPUCycles() * HAL::getInstance()->getCPUCycles());
return lowest + (random % (highest - lowest));
#endif
}
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 3:51 PM
Enable the 'HAL::getInstance()->getCPUCycles()' function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 9:05 PM
Thanks you, it's work for me. I have a different question. Now I have a ScalableImage. How can I show it twice with different position on the screen?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 9:07 PM
For example, in the FlappyBird game, the score can be 1, 11 or 1111. How can I show this with only a ScalableImage that show the number 1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 9:39 PM
If you want to display these ScalableImages in the same time, you must used Independent ScalableImages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 10:58 PM
It's a class in ToughGFX or you mean I must create more ScalableImage?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 11:40 PM
I believe he meant adding more scalable image widgets.
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-07 11:48 PM
Yes, add more scalable Image widgets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 1:21 AM
About "scalable Image widgets display"?

- « Previous
-
- 1
- 2
- Next »