protected ControlContainerBase(ThemeManager.SpriteType type, bool stackAlign = true, bool drawBase = false, bool cropChildren = true, bool autoSize = false)
            : base(type)
        {
            // Initialize properties
            ContainerView = new ContainerView(this);
            _baseChildren = new List <Control>();
            _stackAlign   = stackAlign;
            DrawBase      = drawBase;
            _cropChildren = cropChildren;
            _autoSize     = autoSize;

#if DEBUG
            DrawOutline              = true;
            Drawing.OnFlushEndScene += delegate
            {
                // Debug
                if (DrawOutline && OutlineReady)
                {
                    OutlineReady = false;
                    Rendering.Line.DrawLine(System.Drawing.Color.Red, 1,
                                            Position,
                                            Position + new Vector2(Size.X, 0),
                                            Position + Size,
                                            Position + new Vector2(0, Size.Y),
                                            Position);
                }
            };
#endif
        }
Пример #2
0
        public EmptyControl(ThemeManager.SpriteType type) : base(type)
        {
            // Because this class is intended to serve as a pure placeholder, we don't need to draw the base
            DrawBase = false;

            // Initalize theme specific properties
            OnThemeChange();
        }
 protected DynamicControl(ThemeManager.SpriteType type)
     : base(type)
 {
 }
 public SimpleControlContainer(ThemeManager.SpriteType type, bool stackAlign = true, bool drawBase = false, bool cropChildren = true, bool autoSize = false)
     : base(type, stackAlign, drawBase, cropChildren, autoSize)
 {
     // Initalize theme specific properties
     OnThemeChange();
 }
 protected ControlContainer(ThemeManager.SpriteType type, bool stackAlign = true, bool drawBase = false, bool cropChildren = true, bool autoSize = false)
     : base(type, stackAlign, drawBase, cropChildren, autoSize)
 {
 }
Пример #6
0
 protected Control(ThemeManager.SpriteType type)
 {
     // Apply properties
     Type = type;
 }