예제 #1
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetMenuNode oo = (WidgetMenuNode)o;

            oo.Value = Value;
        }
예제 #2
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetCamera oo = (WidgetCamera)o;

            oo.Type = Type;
        }
예제 #3
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetBox oo = (WidgetBox)o;

            oo.CornerSize = CornerSize;
            oo.CornerPuv01 = CornerPuv01;
            oo.CornerSuv01 = CornerSuv01;
        }
예제 #4
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetMenuScroll oo = (WidgetMenuScroll)o;

            oo.Direction = Direction;
            oo.Speed = Speed;
            oo.Padding = Padding;

            oo.CurrentOffset = CurrentOffset;
            oo.TargetOffset = TargetOffset;
        }
예제 #5
0
        //

        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetFPS oo = (WidgetFPS)o;

            oo.FontStyle = FontStyle.Copy();
            oo.StringUI.Add( StringUI );

            oo.FrameRate = FrameRate;
            oo.FrameCounter = FrameCounter;
            oo.ElapsedTime = ElapsedTime;
        }
예제 #6
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetSlider oo = (WidgetSlider)o;

            oo.IndicatorSize = IndicatorSize;

            oo.Value = Value;
            oo.MinValue = MinValue;
            oo.MaxValue = MaxValue;
            oo.Step = Step;

            // TextWidget - doesn't copy over
        }
예제 #7
0
	// AutoTransform
	public AutoTransform( WidgetBase widget )
	{
		Widget = widget;

		OldIndex = _UI.Sprite.AutoTransformIndex;
		OldOffset = _UI.Sprite.AutoTransformOffset;

		int newIndex = 0;
		Vector3 newOffset = new Vector3();

		if ( Widget.IsFlagSet( E_WidgetFlag.UseMatrix ) )
		{
			newIndex = _UI.Sprite.StorePostMatrix( ref Widget.TransformMatrix );
			newOffset = -Widget.Position;
		}

		_UI.Sprite.SetAutoTransform( newIndex, ref newOffset );
	}
예제 #8
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetRenderState oo = (WidgetRenderState)o;

            oo.State_BlendName = State_BlendName;
            oo.State_Blend = State_Blend;

            oo.State_DepthStencilName = State_DepthStencilName;
            oo.State_DepthStencil = State_DepthStencil;

            oo.State_RasterizerName = State_RasterizerName;
            oo.State_Rasterizer = State_Rasterizer;

            oo.StencilRef = StencilRef;

            oo.ScissorPosition = ScissorPosition;
            oo.ScissorSize = ScissorSize;
        }
예제 #9
0
        private WidgetBase FindChild_Aux(string name, WidgetBase widget)
        {
            for (int i = 0; i < widget.Children.Count; ++i)
            {
                WidgetBase o = widget.Children[i];

                if ((o.Name != null) && (o.Name.Equals(name)))
                {
                    return(o);
                }

                WidgetBase oo = FindChild_Aux(name, o);

                if (oo != null)
                {
                    return(oo);
                }
            }

            return(null);
        }
예제 #10
0
        private WidgetBase FindChild_Aux( string name, WidgetBase widget )
        {
            for ( int i = 0; i < widget.Children.Count; ++i )
            {
            WidgetBase o = widget.Children[ i ];

            if ( ( o.Name != null ) && ( o.Name.Equals( name ) ) )
                return o;

            WidgetBase oo = FindChild_Aux( name, o );

            if ( oo != null )
                return oo;
            }

            return null;
        }
예제 #11
0
        private WidgetBase CopyAndAdd_Aux( Screen screen, WidgetBase widget )
        {
            WidgetBase o = widget.Copy();
            screen.Add( o );

            for ( int i = 0; i < widget.Children.Count; ++i )
            {
            WidgetBase oo = CopyAndAdd_Aux( screen, widget.Children[ i ] );
            oo.Parent( o );
            }

            return o;
        }
예제 #12
0
        // CopyTo
        protected virtual void CopyTo( WidgetBase o )
        {
            o.IsActive = IsActive;
            o.IsSelected = IsSelected;

            o.Name = Name;

            o.RenderPass = RenderPass;
            o.Layer = Layer;

            o.Position = Position;
            o.Size = Size;
            o.Scale = Scale;
            o.Rotation = Rotation;

            o.Align = Align;

            // ParentWidget - doesn't copy over
            o.ParentAttach = ParentAttach;

            // Children - don't copy over

            o.Alpha = Alpha;
            o.Intensity = Intensity;
            o.ColorBaseName = ColorBaseName;
            o.ColorBase = ColorBase;

            o.RenderStateName = RenderStateName;
            o.RenderState = RenderState;

            o.Textures.Capacity = Textures.Count;

            for ( int i = 0; i < Textures.Count; ++i )
            o.Textures.Add( Textures[ i ] );

            o.Timelines.Capacity = Timelines.Count;

            for ( int i = 0; i < Timelines.Count; ++i )
            o.Timelines.Add( Timelines[ i ].Copy() );

            o.AlphaFinal = AlphaFinal;
            o.IntensityFinal = IntensityFinal;
            o.ColorFinal = ColorFinal;

            o.Flags = Flags;
            o.TransformMatrix = TransformMatrix;

            o.UpY = UpY;
        }
예제 #13
0
        // Parent
        public void Parent( WidgetBase widget )
        {
            if ( ParentWidget != null )
            ParentWidget.Children.Remove( this );

            ParentWidget = widget;

            if ( ParentWidget != null )
            ParentWidget.Children.Add( this );
        }
        // Bind
        public void Bind( WidgetBase widget )
        {
            Widget = widget;

            OnBind();
        }
예제 #15
0
        // CopyTo
        protected virtual void CopyTo(WidgetBase o)
        {
            o.IsActive   = IsActive;
            o.IsSelected = IsSelected;

            o.Name = Name;

            o.RenderPass = RenderPass;
            o.Layer      = Layer;

            o.Position = Position;
            o.Size     = Size;
            o.Scale    = Scale;
            o.Rotation = Rotation;

            o.Align = Align;

            // ParentWidget - doesn't copy over
            o.ParentAttach = ParentAttach;

            // Children - don't copy over

            o.Alpha         = Alpha;
            o.Intensity     = Intensity;
            o.ColorBaseName = ColorBaseName;
            o.ColorBase     = ColorBase;

            o.RenderStateName = RenderStateName;
            o.RenderState     = RenderState;

            o.Textures.Capacity = Textures.Count;

            for (int i = 0; i < Textures.Count; ++i)
            {
                o.Textures.Add(Textures[i]);
            }

            o.Timelines.Capacity = Timelines.Count;

            for (int i = 0; i < Timelines.Count; ++i)
            {
                o.Timelines.Add(Timelines[i].Copy());
            }

            o.AlphaFinal     = AlphaFinal;
            o.IntensityFinal = IntensityFinal;
            o.ColorFinal     = ColorFinal;

            o.Flags           = Flags;
            o.TransformMatrix = TransformMatrix;

            o.UpY = UpY;

        #if WINDOWS
            o.Mouse_DefaultBB = Mouse_DefaultBB;
            o.Mouse_PosBB     = Mouse_PosBB;
            o.Mouse_SizeBB    = Mouse_SizeBB;

            // Mouse_OnEnter - doesn't copy over
            // Mouse_OnExit  - doesn't copy over
            // Mouse_OnOver  - doesn't copy over
        #endif
        }
예제 #16
0
        // WidgetBase
        public WidgetBase()
        {
            IsActive = true;
            IsSelected = true;

            Name = null;

            RenderPass = 0;
            Layer = 0;

            Position = new Vector3( 0.0f, 0.0f, 0.0f );
            Size = new Vector3( 0.0f, 0.0f, 0.0f );
            Scale = new Vector2( 1.0f, 1.0f );
            Rotation = new Vector3( 0.0f, 0.0f, 0.0f );

            Align = E_Align.TopLeft;

            ParentWidget = null;
            ParentAttach = E_Align.None;

            Children = new List< WidgetBase >();

            Alpha = 1.0f;
            Intensity = 1.0f;
            ColorBaseName = null;
            ColorBase = Color.Magenta;

            RenderStateName = null;
            RenderState = new RenderState( (int)E_Effect.MultiTexture1, E_BlendState.AlphaBlend );

            Textures = new List< SpriteTexture >();

            Timelines = new List< Timeline >();

            AlphaFinal = Alpha;
            IntensityFinal = Intensity;
            ColorFinal = ColorBase;

            Flags = (int)E_WidgetFlag.InheritAlpha | (int)E_WidgetFlag.InheritIntensity;
            TransformMatrix = Matrix.Identity;

            UpY = 1.0f;
        }
예제 #17
0
 // Bind
 public void Bind( WidgetBase widget )
 {
     for ( int i = 0; i < Effects.Count; ++i )
     Effects[ i ].Bind( widget );
 }
예제 #18
0
        // Bind
        public void Bind(WidgetBase widget)
        {
            Widget = widget;

            OnBind();
        }
예제 #19
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetMenuBase oo = (WidgetMenuBase)o;

            oo.Type = Type;
            oo.Loop = Loop;

            // Nodes - don't copy over

            oo.CurrentNode = CurrentNode;

            oo.DeactivateArrows = DeactivateArrows;

            // ArrowDecrease - doesn't copy over
            // ArrowIncrease - doesn't copy over
        }
예제 #20
0
 // Add
 public void Add( WidgetBase widget )
 {
     Widgets.Add( widget );
 }
예제 #21
0
        // CopyTo
        protected override void CopyTo( WidgetBase o )
        {
            base.CopyTo( o );

            WidgetText oo = (WidgetText)o;

            oo._String = _String;

            if ( StringUI != null )
            oo.StringUI = new StringUI( StringUI );

            oo.FontStyleName = FontStyleName;

            if ( FontStyle != null )
            oo.FontStyle = FontStyle.Copy();

            oo.FontEffects.Capacity = FontEffects.Count;

            for ( int i = 0; i < FontEffects.Count; ++i )
            oo.FontEffects.Add( FontEffects[ i ].Copy() );

            oo.RenderSizeY = RenderSizeY;
            oo.RenderSizeX = RenderSizeX;

            oo.Cache = Cache;

            if ( SpriteListCache != null )
            {
            oo.SpriteListCache = new FontSpriteList();
            SpriteListCache.CopyTo( oo.SpriteListCache );
            }

            oo.CacheValid = CacheValid;

            oo.FrameTime = FrameTime;
        }
예제 #22
0
 // Add
 public void Add(WidgetBase widget)
 {
     Widgets.Add(widget);
 }