Search the Community
Showing results for tags 'Sprite'.
-
WidgetSprite setTransform acting weirdly when width and hegiht are manually set.
mohamed.irshad.k posted a topic in UI Systems
When a WidgetSprite is rotated which has its size set manually by using setWidth() and setHeight() it gives unexpected result. If the size is set to (0, 0) then the rotation works as expected. Below is the sample code: WidgetSprite sprite; int init() { Gui gui = engine.getGui(); sprite = new WidgetSprite(gui,"samples/widgets/textures/background.png"); sprite.setPosition(400, 300); // Uncomment to see the problem. //sprite.setWidth(128); //sprite.setHeight(128); gui.addChild(sprite, GUI_ALIGN_OVERLAP); return 1; } float fAngle = 1.0f; int update() { sprite.setTransform(rotateZ(fAngle)); fAngle += 0.1; return 1; } int shutdown() { delete sprite; return 1; }- 9 replies
-
- WidgetSprite
- Sprite
-
(and 3 more)
Tagged with:
-
Hi What is the workflow for animations of sprites for a 2D game? Do you have any examples and code? Thanks Paul
- 3 replies
-
- sprite animations
- 2d
-
(and 3 more)
Tagged with:
-
Hi! Create Sprite model through WidgetSpriteNode. Sprite turns very dark because of the low lighting. How do I add lighting to the model and that this action does not affect the main stage. Thank you!
-
Hello together, I attached an example project. If you start the batch, you'll see a TabBox, with a given sprite, that loads a white PNG file and renders it with a given color. If you swap now fast the tab's you'll see, that the color of the sprite swaps to blue/green/yellow and so on, and always render the widget complete from right to left, or left to right whatever, that looks not really "cute" and fine for the consumer. Is there any possibility to manage this problem(s)? Best regards Lars