Ezelia / EZGUI

EZGUI - The missing GUI for Pixi.js and Phaser.io
http://ezgui.ezelia.com
440 stars 95 forks source link

Interactive error when resize canvas #55

Open tunglt1810 opened 8 years ago

tunglt1810 commented 8 years ago

Hi, i am using pixi and EZGUI to create an online game. And i have some problems with components in a List component or Slider components when i resize canvas fit to browser size. When in small size, i can't drag the slider, and can't click exactly to another button in the list beside the first one. I using this codes for resize canvas untitled You can check this issus in my page : http://t5.tofu.vn Thank for your help and sorry for my bad english

alaa-eddine commented 8 years ago

Hi, I'm afraid the only way to keep controls consistency after screen resize is to rebuild them (using rebuild()) method, in your case you have to rebuild the whole screen.

in your case, you should call .rebuild() in your main EZGUI control so it redraw the whole scene after resize. you'll maybe need to keep an interval of time between resize to prevent unnesseccary redraws dyring the resize operation.

tunglt1810 commented 8 years ago

Thank you very much, i will try and feedback.