Exemplo n.º 1
0
        public void FromItem(AGSSerializationContext context, ILabel item)
        {
            Object = new ContractObject();
            Object.FromItem(context, (IObject)item);

            TextComponent = context.GetContract(item as ITextComponent);
        }
Exemplo n.º 2
0
        public void FromItem(AGSSerializationContext context, IObject obj)
        {
            ISlider item = (ISlider)obj;

            Object = new ContractObject();
            Object.FromItem(context, item);

            Graphics        = new ContractObject();
            Graphics.Parent = this;
            Graphics.FromItem(context, item.Graphics);

            HandleGraphics        = new ContractObject();
            HandleGraphics.Parent = this;
            HandleGraphics.FromItem(context, item.HandleGraphics);

            Label = new ContractLabel();
            if (item.Label != null)
            {
                Label.FromItem(context, item.Label);
            }

            MinValue             = item.MinValue;
            MaxValue             = item.MaxValue;
            Value                = item.Value;
            Direction            = item.Direction;
            AllowKeyboardControl = item.AllowKeyboardControl;
        }
        public void FromItem(AGSSerializationContext context, IInventoryWindow item)
        {
            Object = new ContractObject();
            Object.FromItem(context, item);

            Inventory = item.Inventory == null ? null : context.GetContract(item.Inventory);

            ItemWidth  = item.ItemSize.Width;
            ItemHeight = item.ItemSize.Height;
        }
Exemplo n.º 4
0
        public void FromItem(AGSSerializationContext context, IObject item)
        {
            IButton button = (IButton)item;

            Object = new ContractObject();
            Object.FromItem(context, button);

            TextComponent = new ContractTextComponent();
            TextComponent.FromItem(context, button);

            IdleAnimation   = context.GetContract(button.IdleAnimation);
            HoverAnimation  = context.GetContract(button.HoverAnimation);
            PushedAnimation = context.GetContract(button.PushedAnimation);
        }
Exemplo n.º 5
0
        public void FromItem(AGSSerializationContext context, ICharacter item)
        {
            if (item == null)
            {
                return;
            }
            WalkSpeed = item.WalkStep;
            AdjustWalkSpeedToScaleArea = item.AdjustWalkSpeedToScaleArea;
            DebugDrawWalkPath          = item.DebugDrawWalkPath;

            Outfit = context.GetContract(item.Outfit);

            Obj = new ContractObject();
            Obj.FromItem(context, item);

            Inventory = context.GetContract(item.Inventory);

            if (context.Player == item)
            {
                IsPlayer = true;
            }
        }
Exemplo n.º 6
0
 public void FromItem(AGSSerializationContext context, IPanel item)
 {
     Object = new ContractObject();
     Object.FromItem(context, item);
 }