Пример #1
0
        public int IndexOf(UIControlModel controlModel)
        {
            int index = Children.IndexOf(controlModel);

            if (index == -1)
            {
                return(-1);
            }
            if (HasSpecialSprite)
            {
                index--;
            }
            return(index);
        }
Пример #2
0
        public void RemoveControl(UIControlModel controlModel)
        {
            int index = Children.IndexOf(controlModel);

            if (index == -1)
            {
                return;
            }
            Children.RemoveAt(index);
            if (HasSpecialSprite)
            {
                index--;
            }
            groupControl.ChildControls.RemoveAt(index);
            subcomponent.PauModel.ForceRender();
        }
Пример #3
0
 public UISpriteGroupModel(
     UISubcomponentModel subcomponent,
     UIControlModel parent,
     SpriteGroup spriteGroup,
     bool isSpriteCollectionChild,
     bool visibility) : base(subcomponent, null)
 {
     this.spriteGroup        = spriteGroup;
     parentControlModel      = parent;
     IsSpriteCollectionChild = isSpriteCollectionChild;
     currentVisibility       = visibility;
     foreach (Sprite sprite in spriteGroup.Sprites)
     {
         Children.Add(new UISpriteModel(subcomponent, this, sprite));
     }
 }
 public void SetControl()
 {
     UnapplyAnimations();
     Control = PaaModel.subcomponentModel.PauModel.ControlDictionary.GetValueOrDefault(animationsList.ControlName);
 }