Jump to content

GUI - TextBlock Size fit parent


royibernthal
 Share

Recommended Posts

Width and height by default I think are 1, which means '100%'. If you write it like that then apostrophees are required, otherwise you can write a number between 0-1 which will be interpreted as %.

The thing is the dimensions in percentage don't affect the text size, neither does scale.

By changing textBlock.text do you mean changing the font size?

Link to comment
Share on other sites

3 hours ago, royibernthal said:

Width and height by default I think are 1, which means '100%'. If you write it like that then apostrophees are required, otherwise you can write a number between 0-1 which will be interpreted as %.

The thing is the dimensions in percentage don't affect the text size, neither does scale.

By changing textBlock.text do you mean changing the font size?

Ok the percentage is correct...

I am not using GUI a lot so I may be wrong.

Link to comment
Share on other sites

5 hours ago, royibernthal said:

Right I forgot :)

I don't have a problem with manually selecting the right font size, but is a huge font size the best option? Won't it hurt performance? At the moment locally I'm using fontSize 500.

http://www.babylonjs-playground.com/#ZI9AK7#18

It won't hurt the performance.

And following statistics I can say it is ok to put big text.

Before: 60 fps

After: 60 fps

No Change

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...