formatting a spritefont table

0 favourites
  • 3 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • hi, I'm formatting a table using a sprite font object.

    I plan on saving data each player's turn. I will save the data to CSV database. I also want to display this info in a table.

    So I was planning on using a monospace font and cycling through the CSV and for each ROW I would create an "append" to the spritefont text. In between the fields I would add tab characters to make everything line up.

    Is there a better way to do this? Also what is the character for tab? I know SHIFT-ENTER is newline but every time I use the TAB key in C3 I tab-out and lose focus on the field. When I type \t it just displays the text.

    When I build the string there is no system var for tab (like newline) how would I format the append text so my columns line up? I probably need to do a len() or something.

    *EDIT okay so I'm now setting up a new spritefont instance for each column.. that seems to work better so far

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is also what I do for a high score leaderboard. One column/instance for name and one column/instance for score. It also allows for you to more easily do formatting like center or right / left justify per column as needed.

  • Mikal

    yup thanks! this is definitely the way to go...and much easier than tab characters!

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