-
Notifications
You must be signed in to change notification settings - Fork 153
Description
I have a problem adding UIText to UIScrollableVerticalLayout and scrolling it. I assign the parentUI to be my scrollable variable - text is shown but it doesn't scroll. What is the best way to implement this? There is an example with UITouchableSprite and buttons but that doesn't help as UIText is not touchable and therefore it never calls onTouchMoved() in UIScrollableVerticalLayout class.
scrollable = new UIScrollableVerticalLayout(10);
scrollable.alignMode = UIAbstractContainer.UIContainerAlignMode.Left;
scrollable.position = new Vector3(Screen.width*(CameraNavigation.mainCameraNormalizedViewPortRect.width + 0.05f), -50, 0 );
//Reading data from resource .txt and assigning it to lines variable
for(int i = 0; i<lines.Length;i++)
{
var countryInfoText = textType.addTextInstance(lines[i],Screen.width* 0.05f,textSize, 0.4f, -1,Color.white,UITextAlignMode.Center, UITextVerticalAlignMode.Middle );
textSize = textSize + (textType.sizeForText(lines[i]).y * 0.3f) ;
countryInfoText.parentUIObject = scrollable;
...
}