Page 1 of 1

Sprite position problem while resizing

PostPosted: Fri Jan 16, 2015 12:06 pm
by Maxoulaf
Hello,

First of all there is a screenshot in game : Image (it's voluntary blurred, we only care about the GUI on the bottom)

Icons like sound or zoom are placed with the IgeUiElement attributs left and bottom. I set a value in percent and mount this UiElement on the main bar so when I resize the window, everything fit. But there is the problem : if I resize too fastly, or if I put the fullscreen, every element placed with percentage on the main bar is messed up, like that : Image . And everything go back to normal if I resize slowly, even a very little resize like 1px.

I have a similar problem with my IgeFontEntity and the attribut autoWrap(true). Those which are mount in the main bar are not correctly wrapped (like one or two letters are cut at the right of my sentence), until I resize, even a little. Then it fits correctly.

Thanks for your concern
(Sorry for the english mistakes, I'm a french student)

Re: Sprite position problem while resizing

PostPosted: Mon Mar 02, 2015 4:48 pm
by robaldred
I'm guessing this issue is like you say related to fast resizes and either miss calculation or the browser miss reporting the dimensions.
The simple solution would be to implement a simple timer so that the resize event only does something say 100ms after the last resize event was triggered