Game Development Community

Only part of object showing

by Mike Treanor · in Torque Game Builder · 10/11/2008 (2:00 pm) · 1 replies

I am dynamically creating text and displaying it on the screen and having this problem where only the first few characters are showing of the string of text. Its like there is some sort of box small visibility box that isn't stretched out enough to encompass the entire text. I am using the following code:

%this.currText = new t2dTextObject() {
	    scenegraph = SceneWindow2D.getScenegraph();
            canSaveDynamicFields = "1";
            Position = "-20 -20";
            size = "23.680 10.158";
            Layer = "4";
            BlendColor = "0.007843 1 0.976471 1";
            text = %this.challengeText[%this.index];
            font = "Arial";
            wordWrap = "0";
            hideOverflow = "1";
            //textAlign = "Left";
            lineHeight = "5.30392";
            aspectRatio = "1";
            //lineSpacing = "0.1";
            characterSpacing = "0";
            autoSize = "1";
            fontSizes = "80";
            textColor = "0.007843 1 0.976471 1";
               hideOverlap = "0";
               mountID = "3";
	};

I know this is one of those stupid problems with some glaringly obvious solution... I hope...

#1
10/13/2008 (2:55 pm)
Stupid problem mostly resolved... or at least worked around:

I changed the hideOverflow to "0".

However, my problem still remains, how can I make it so the text isn't overflow in the first place? I want the visibility box to be the size of the text. I would imagine it would be the size variable would be it, right? Nope.

Does anyone know what I mean? Can someone help?

Thanks.