public override void Init() { base.Init(); _paywayText = FindInChild <TextProxy>("UseItem/wayText"); _amountText = FindInChild <Text>("Value"); _signObj = FindChild("sign"); }
public override void Init() { base.Init(); _accountText = FindInChild <TextProxy>("num"); _titleText = FindInChild <TextProxy>("BackBtn/SettingText"); int i = 0; for (; i < 6; i++) { int index = i + 1; GameObject obj = FindChild("payword/" + index); _lengthObj[i] = obj; obj.SetActive(false); } i = 0; for (; i < 10; i++) { Button btn = FindInChild <Button>("keypad/Button" + i); _numberBtn[i] = btn; int number = i; btn.onClick.AddListener(() => { OnClickNumber(number); }); } _backBtn = FindInChild <Button>("BackBtn"); _deleteBtn = FindInChild <Button>("keypad/Delete"); _deleteBtn.onClick.AddListener(OnClickDelete); }
public TextFadeInAnimationProperty(TextProxy text, byte targetAlpha) { this.text = text; this.targetAlpha = targetAlpha; // Avoid undesired flash on the first frame value = 0f; }
public override void Init() { base.Init(); _head = FindInChild <ImageProxy>("BigHead"); _title = FindInChild <TextProxy>("Top/Back/text"); _uploadBtn = FindInChild <Button>("Top/SelectBtn"); _uploadBtn.onClick.AddListener(OnClickUpload); }
public override void Init() { base.Init(); _bankIcon = FindInChild <ImageProxy>("icon"); _cardName = FindInChild <TextProxy>("bankName"); _lastNumber = FindInChild <TextProxy>("lastNum"); _btn = GetComponent <Button>(); _btn.onClick.AddListener(OnClickBtn); }
public override void Init() { base.Init(); _personalMainBtn = FindInChild <Button>("Content/Item1"); _headImg = FindInChild <ImageProxy>("Content/Item1/head"); _realName = FindInChild <TextProxy>("Content/Item2/name"); _accountText = FindInChild <TextProxy>("Content/Item3/num"); _personalMainBtn.onClick.AddListener(OnClickPersonalMain); }
static public void AddText(MenuCommand menuCommand) { GameObject go = new GameObject("TextProxy"); TextProxy txt = go.AddComponent <TextProxy>(); go.transform.SetParent(Selection.activeGameObject.transform); txt.raycastTarget = false; txt.font = AssetDatabase.LoadAssetAtPath <Font> ("Assets/Arts/tif/default.ttf"); go.transform.localPosition = Vector3.zero; go.transform.localScale = Vector3.one; Selection.activeObject = go; }
public override void Init() { base.Init(); GameObject contentObj = FindChild("ScrollView/Viewport/Content"); _totalText = Utils.FindInChild <TextProxy>(contentObj, "UpPart/TotalText"); _yesterdayText = Utils.FindInChild <TextProxy>(contentObj, "UpPart/YesterdayText"); _accText = Utils.FindInChild <TextProxy>(contentObj, "UpPart/Acc/Value"); _wanYuanText = Utils.FindInChild <TextProxy>(contentObj, "UpPart/WanYuan/Value"); _closeEyesObj = Utils.FindChild(contentObj, "UpPart/OpenEyes/CloseEyes"); _eyesBtn = Utils.FindInChild <Button>(contentObj, "UpPart/OpenEyes"); _eyesBtn.onClick.AddListener(ClickEyes); _eyesState = true; }
public override void Init() { base.Init(); _backImg = FindInChild <ImageProxy>("ScrollView/Viewport/Content/bigHead"); _head = FindInChild <ImageProxy>("ScrollView/Viewport/Content/head/head"); _nickName = FindInChild <TextProxy>("ScrollView/Viewport/Content/nickName"); _signatureText = FindInChild <TextProxy>("ScrollView/Viewport/Content/signature"); _accountText = FindInChild <TextProxy>("ScrollView/Viewport/Content/account/value"); _realNameText = FindInChild <TextProxy>("ScrollView/Viewport/Content/realName/value"); _systemHeadObj = FindChild("ScrollView/Viewport/Content/head/system_head"); _uploadHeadBtn = FindInChild <Button>("ScrollView/Viewport/Content/head"); _uploadBackBtn = FindInChild <Button>("ScrollView/Viewport/Content/bigHead"); _changeNickBtn = FindInChild <Button>("ScrollView/Viewport/Content/changeNameBtn"); _uploadHeadBtn.onClick.AddListener(OnClickUploadHead); _uploadBackBtn.onClick.AddListener(OnClickUploadBack); _changeNickBtn.onClick.AddListener(OnClickChangeName); }
static void SetUI() { Button[] buttons = GameObject.FindObjectsOfType <Button> (); for (int i = 0; i < buttons.Length; i++) { buttons [i].navigation = new Navigation(); } Text[] texts = Selection.activeGameObject.GetComponentsInChildren <Text>(); for (int i = 0; i < texts.Length; i++) { string s = texts[i].text; int m = texts[i].fontSize; Font f = texts[i].font; Color c = texts[i].color; TextAnchor a = texts[i].alignment; GameObject go = texts[i].gameObject; GameObject.DestroyImmediate(texts[i]); TextProxy p = go.AddComponent <TextProxy>(); p.text = s; p.font = f; p.fontSize = m; p.color = c; p.alignment = a; } Image[] images = Selection.activeGameObject.GetComponentsInChildren <Image>(); for (int i = 0; i < images.Length; i++) { if (images [i] is ImageProxy || images [i] is UnityEngine.UI.ProceduralImage) { continue; } Sprite s = images[i].sprite; Color c = images[i].color; Material m = images[i].material; Image.Type t = images [i].type; GameObject go = images[i].gameObject; GameObject.DestroyImmediate(images[i]); ImageProxy p = go.AddComponent <ImageProxy>(); p.type = t; p.sprite = s; p.material = m; p.color = c; } }
public override void Init() { base.Init(); _moneyText = FindInChild <TextProxy>("Panel/Top/Balance/Value"); }
public void Start() { Proxy = new TextProxy(transform); }
public override void Init() { base.Init(); _detailText = FindInChild <TextProxy>("DetailText"); }