You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
535 B
27 lines
535 B
1 year ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
namespace BestHTTP.Examples.Helpers
|
||
|
{
|
||
|
public class TextListItem : MonoBehaviour
|
||
|
{
|
||
|
#pragma warning disable 0649
|
||
|
[SerializeField]
|
||
|
private Text _text;
|
||
|
#pragma warning restore
|
||
|
|
||
|
public void SetText(string text)
|
||
|
{
|
||
|
this._text.text = text;
|
||
|
}
|
||
|
|
||
|
public void AddLeftPadding(int padding)
|
||
|
{
|
||
|
this.GetComponent<LayoutGroup>().padding.left += padding;
|
||
|
}
|
||
|
}
|
||
|
}
|