is it possible to create text label dynamically

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • i have some array of data that i want to display on the screen the data contain user name , country and a picture of the user.

    Now i want to display these information,but i dont know how to generate text label dynamically on canvas...

    if there is any sample or tip then kindly share it...i take the data from webstorage which contain around 20 different user information which i like to show on the canvas...

    any idea???

  • <img src="http://s16.postimg.org/lowgyjtk5/textbox.jpg" border="0" />

    (I've only put the webstorage thing in as a placeholder, don't try and replicate that part).

    With the System/Create Object action you can create anything that's in your game at runtime then once you've created it you can assign it whatever properties you choose.

    In the above example I created a textbox you could just as easily create text or better still spritefont text it's all the same process System/Create Object.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • not so easy to explain, if you dont know what is what but

    you need a loop,

    a for loop or repeat,

    repeat 20 times, create txtobject, at 50,50+loopindex*txtobject.height

    and set txtobject.txt to webstorage at key loopindex

    do a search for these things...

  • thanks for your replies guys , but special thanks to bertie Booster who has explained in very precise and with perfect snapshot ...it was not that much hard though but got the proper direction.. once again thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)