5 protected int m_iMaxTextLenght;
8 override void HandlerAttached(Widget w)
14 override bool OnUpdate(Widget w)
16 GetGame().GetCallqueue().CallLater(LimitText, 0,
false, w);
22 protected void LimitText(Widget w)
24 TextWidget textWidget = TextWidget.Cast(w);
29 string text = textWidget.GetText();
32 if (text.Length() > m_iMaxTextLenght)
34 text = text.Substring(0, m_iMaxTextLenght);
38 textWidget.SetText(text);