public void SetPressedImage(ImagePart image) { if (PressedImage != null) { PressedImage.SetSpriteImage(image); } else { PressedImage = new UISprite(image, Vector2.Zero); if(state == UIMenuItemButtonState.pressed) AddChild(PressedImage); } }
public void SetIdleImage(ImagePart image) { if (IdleImage != null) { IdleImage.SetSpriteImage(image); } else { IdleImage = new UISprite(image,Vector2.Zero); if (state == UIMenuItemButtonState.normal) AddChild(IdleImage); } }