Пример #1
0
 public void SetPressedImage(ImagePart image)
 {
     if (PressedImage != null)
     {
         PressedImage.SetSpriteImage(image);
     }
     else
     {
         PressedImage = new UISprite(image, Vector2.Zero);
         if(state == UIMenuItemButtonState.pressed)
         AddChild(PressedImage);
     }
 }
Пример #2
0
 public void SetIdleImage(ImagePart image)
 {
     if (IdleImage != null)
     {
         IdleImage.SetSpriteImage(image);
     }
     else
     {
         IdleImage = new UISprite(image,Vector2.Zero);
         if (state == UIMenuItemButtonState.normal)
         AddChild(IdleImage);
     }
 }