Previous topicNext topic

Text width

Suggestions for new features for Magic.
Post Reply
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Text width

Post by Sadler »

In order to position text correctly (or dynamically) it would be good to have access to the text width/height somehow. These values can change on scaling, font selection and string length. There is currently no way to reference parameter values from active modules but this might be a good way to achieve such a feature especially when considering multiple text modules in a scene.

e.g. Transform.x = Text1.Width / 2
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Text width

Post by Magic »

So you're wanting to position some other element in the scene based on the text width?
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Text width

Post by Sadler »

That's a possibility, certainly.

Also, when scrolling a piece of text across the screen the wrap (if you want to wrap it) is sensitive to the width (or height if scrolling vertically).

For example one must translate text size 28 (font moonhouse) from -6 to +6 and text size 60 must be translated from -11 to +11. A different font will have different translations. So if I type in a new message (in a live situation) and want to have it scroll correctly I must adjust the translate and wrap parameters before it does.

I guess there's a lot of scope for relative positioning and scaling that the availability of width/height values for any module might prove useful or interesting.
Post Reply