Ezelia / EZGUI

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

Images don't work with Labels? #52

Closed Shadowstep33 closed 8 years ago

Shadowstep33 commented 8 years ago

If so this is fine, but I would then purport some sort of disambiguation between Labels and Layouts because currently as it is it seems it makes the most sense to just use the Layout component anywhere I would want a Label, in the chance I want to add an image to it.

Or perhaps I must be explicitly using bg: { ... } ?

alaa-eddine commented 8 years ago

you can use Layout as label, but if you only need to render text, using Label is better, because it's a light component which only display a text. it's for optimization purpose since mobile HTML5 games need such granularity in optimization.

for example if you have a score text in the top corner of your game screen, it makes sens to use Label since it's faster to render, and you don't need image or border for the score display.

Shadowstep33 commented 8 years ago

ahhhhh makes loads of sense. Thanks for the explanation!