private void OnValidate() { if (buttonObject != null) { buttonObject.SetColor(DepressedColor); } }
public void SetPlaneKey(string imageKey, ref float addY) { Transform transform = base.transform.FindChild("ChatPlane"); if (transform != null) { SimpleSprite component = transform.GetComponent <SimpleSprite>(); if (component != null) { Transform transform2 = base.transform.FindChild("ChatText"); if (transform2 != null) { UIListItemContainer component2 = transform2.GetComponent <UIListItemContainer>(); if (null != component2) { Vector2 vector = (Vector2)component2.Data; float num = vector.x + 20f; float h = vector.y + 10f; component.Setup(num, h, imageKey); component.SetColor(new Color(1f, 1f, 1f, 0.8f)); component.transform.rotation = base.transform.rotation; component.transform.localScale = new Vector3(this.fBackImageScaleX, this.fBackImageScaleY, 1f); component2.transform.localPosition = new Vector3(-(num * this.fEmoticonScale) / 2f + 20f * this.fEmoticonScale / 2f, vector.y * this.fEmoticonScale / 2f, 0f); } } else { component.Hide(true); } } } }
public void ToggleOn(int id) { enabled = true; _ss.SetColor(_ss.color * 2); }