public override void Reload(UICollection uic, UIElementLayout uiel)
        {
            base.Reload(uic, uiel);
            var temp = uiel as UIButtonSaveLayout;

            if (temp.ButtonAnim_ClickState == null)
            {
                temp.ButtonAnim_ClickState = new ShapeAnimation();
            }
            if (temp.ButtonAnim_RestState == null)
            {
                temp.ButtonAnim_RestState = new ShapeAnimation();
            }
            if (temp.ButtonAnim_HoverState == null)
            {
                temp.ButtonAnim_HoverState = new ShapeAnimation();
            }

            temp.ButtonAnim_ClickState.ReloadTexture();
            temp.ButtonAnim_RestState.ReloadTexture();
            temp.ButtonAnim_HoverState.ReloadTexture();

            ButtonAnim_RestState  = temp.ButtonAnim_RestState;
            ButtonAnim_HoverState = temp.ButtonAnim_HoverState;
            ButtonAnim_ClickState = temp.ButtonAnim_ClickState;
        }
        public override UIElementLayout GenerateSaveInfo(UIElementLayout UIEL)
        {
            UINumericInputLayout UINEL = new UINumericInputLayout();

            UINEL.defaultInput = defaultInput;
            return(base.GenerateSaveInfo(UIEL));
        }
        public override void Reload(UICollection uic, UIElementLayout uiel)
        {
            base.Reload(uic, uiel);
            var temp = uiel as UIScreenSliderSaveLayout;

            sliderType = temp.UIST;
        }
        public override void Reload(UICollection uic, UIElementLayout uiel)
        {
            base.Reload(uic, uiel);
            var temp = uiel as UINumericInputLayout;

            defaultInput = temp.defaultInput;
        }
        public virtual void Reload(UICollection uic, UIElementLayout uiel)
        {
            collectionParent = uic;
            name             = uiel.name;
            description      = uiel.description;
            id = uiel.ID;
            holdEventActivateTimer = uiel.holdEventActivateTimer;
            holdEventTick          = uiel.holdEventTick;
            activateType           = uiel.activateType;

            initialPosition = uiel.Position;
            initialSize     = uiel.Size;

            position = initialPosition;
            size     = initialSize;

            try
            {
                baseTexture = Game1.contentManager.Load <Texture2D>(uiel.baseTexLoc);
            }
            catch (Exception)
            {
                baseTexture     = Game1.hitboxHelp;
                uiel.baseTexLoc = baseTexture.Name.Replace(Game1.rootContent, "");
            }

            if (uiElementRender == null || uiElementRender.IsDisposed)
            {
                uiElementRender = new RenderTarget2D(Game1.graphics.GraphicsDevice, size.X, size.Y);
            }
        }
Beispiel #6
0
        public override UIElementLayout GenerateSaveInfo(UIElementLayout UIEL)
        {
            UITextElementLayout UITEL = new UITextElementLayout();

            UITEL.text = Text;

            return(base.GenerateSaveInfo(UITEL));
        }
        public override UIElementLayout GenerateSaveInfo(UIElementLayout UIEL)
        {
            var UIBEL = new UIButtonSaveLayout();

            UIBEL.ButtonAnim_ClickState = ButtonAnim_ClickState;
            UIBEL.ButtonAnim_HoverState = ButtonAnim_HoverState;
            UIBEL.ButtonAnim_RestState  = ButtonAnim_RestState;
            return(base.GenerateSaveInfo(UIBEL));
        }
        public virtual UIElementLayout GenerateSaveInfo(UIElementLayout UIEL)
        {
            UIEL.activateType           = activateType;
            UIEL.description            = description;
            UIEL.name                   = name;
            UIEL.Size                   = size;
            UIEL.holdEventActivateTimer = holdEventActivateTimer;
            UIEL.holdEventTick          = holdEventTick;
            UIEL.ID       = ElementID;
            UIEL.Position = position;

            return(UIEL);
        }
Beispiel #9
0
        public override void Reload(UICollection uic, UIElementLayout uiel)
        {
            base.Reload(uic, uiel);
            var temp = uiel as UITextElementLayout;

            try
            {
                sf = Game1.contentManager.Load <SpriteFont>(temp.fontLocation);
            }
            catch (Exception)
            {
                sf = Game1.defaultFont;
            }
            Text = temp.text;
        }
        public override UIElementLayout GenerateSaveInfo(UIElementLayout UIEL)
        {
            UIScreenSaveLayout UISEL = new UIScreenSaveLayout();

            return(base.GenerateSaveInfo(UISEL));
        }