protected override void Awake() { onEndEdit.AddListener(delegate { OnTextEdited(); }); //onValidateInput += delegate (string input, int charIndex, char addedChar) { return OnValidate(addedChar); }; underLine_ = GetComponentInChildren <UIGaugeRenderer>(includeInactive: true); dateUI_ = GetComponentInParent <DateUI>(); }
// Use this for initialization protected override void Start() { textField_ = GetComponentInParent <LineField>(); verticalLine_ = GetComponentInChildren <UIGaugeRenderer>(includeInactive: true); onValueChanged.AsObservable().Subscribe(x => { Line line = textField_.BindedLine; bool isFolded = !isOn; if (line != null && line.IsFolded != isFolded) { line.Tree.OnFoldUpdated(line, isFolded); } }).AddTo(this); }
public void Bind(Line line) { if (textComponent_ == null) { textComponent_ = GetComponentInChildren <Text>(); strikeLine_ = textComponent_.GetComponentInChildren <UIGaugeRenderer>(includeInactive: true); checkMark_ = GetComponentInChildren <CheckMark>(includeInactive: true); listMark_ = GetComponentInChildren <Button>().GetComponentInChildren <UIMidairPrimitive>(); tagParent_ = GetComponentInParent <TagParent>(); } BindedLine = line; Text = line.TextWithoutHashTags; IsDone = line.IsDone; }
protected override void InitValue() { gauge_ = Object.GetComponentInChildren <GaugeRenderer>(); uigauge_ = Object.GetComponentInChildren <UIGaugeRenderer>(); if (initialValue_ != null) { UpdateAnimValue(); return; } if (gauge_ != null) { switch (Param) { case ParamType.GaugeLength: initialValue_ = (float)gauge_.Length; break; case ParamType.GaugeRate: initialValue_ = (float)gauge_.Rate; break; case ParamType.GaugeWidth: initialValue_ = (float)gauge_.Width; break; } } else if (uigauge_ != null) { switch (Param) { case ParamType.GaugeLength: initialValue_ = (float)uigauge_.Length; break; case ParamType.GaugeRate: initialValue_ = (float)uigauge_.Rate; break; case ParamType.GaugeWidth: initialValue_ = (float)uigauge_.Width; break; } } }
public void Initialize() { strikeLine_ = GetComponentInChildren <UIGaugeRenderer>(includeInactive: true); checkMark_ = textComponent.transform.Find("Check").GetComponent <CheckMark>(); //listMark_ = textComponent.transform.Find("Mark").GetComponent<UIMidairPrimitive>(); }