1234567891011121314151617181920 |
- using UnityEngine;
- using System.Collections;
- public class CommonInfoDialog : ScreenBase
- {
- public UILabel title, text;
- public void SetTitleAndText(string titleKey, string textKey, UIWidget.Pivot pivot = UIWidget.Pivot.Center, object[] textParams = null)
- {
- title.text = Localization.instance.Get(titleKey);
- text.text = Localization.instance.Get(textKey);
- if (textParams != null)
- {
- text.text = string.Format(text.text, textParams);
- }
- text.pivot = pivot;
- title.MarkAsChangedLite();
- text.MarkAsChangedLite();
- }
- }
|