public void setContent(string text) { if (_textLabel == null) { findChildren(); } _arcType = MenuBehavior.MenuType.TEXT; (_textLabel.GetComponent(typeof(TextMesh)) as TextMesh).text = text; _textLabel.renderer.enabled = true; }
public void setContent(Sprite activeSprite, Sprite inactiveSprite = null, float scalingFactor = 1.0f) { _spriteScalingFactor = scalingFactor; if (_activeSprite == null || _inactiveSprite == null) { findChildren(); } _arcType = MenuBehavior.MenuType.ICON; (_activeSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = activeSprite; if (inactiveSprite != null) { _inactiveSpriteAvailible = true; (_inactiveSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = inactiveSprite; _inactiveSprite.renderer.enabled = true; } else { _activeSprite.renderer.enabled = true; } }
public void setContent(string text) { if(_textLabel == null) { findChildren(); } _arcType = MenuBehavior.MenuType.TEXT; (_textLabel.GetComponent(typeof(TextMesh)) as TextMesh).text = text; _textLabel.GetComponent<Renderer>().enabled = true; }
public void setContent(Sprite activeSprite, Sprite inactiveSprite = null, float scalingFactor = 1.0f) { _spriteScalingFactor = scalingFactor; if(_activeSprite == null || _inactiveSprite == null) { findChildren(); } _arcType = MenuBehavior.MenuType.ICON; (_activeSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = activeSprite; if(inactiveSprite != null) { _inactiveSpriteAvailible = true; (_inactiveSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = inactiveSprite; _inactiveSprite.GetComponent<Renderer>().enabled = true; } else { _activeSprite.GetComponent<Renderer>().enabled = true; } }