Exemple #1
0
        public Selector(
            Widget holder,
            Boolean fillEnabled = false,
            Boolean outlineEnabled = true,
            Boolean constantDrawing = false)
            : base()
        {
            Holder = holder;

            if (Holder != null)
                Holder.AddWidget(this);

            HolderOffset = new FloatRect();

            IsActive = false;

            FillColor = DEFAULT_FILL_COLOR;
            OutlineColor = DEFAULT_OUTLINE_COLOR;

            OutlineThickness = DEFAULT_OUTLINE_THICKNESS;

            ConstantDrawing = constantDrawing;

            MoveOffset = DEFAULT_MOVE_OFFSET;
            MoveIsEnabled = true;

            SelectionShape = new Shape();
            SelectionShape.EnableFill(fillEnabled);
            SelectionShape.EnableOutline(outlineEnabled);
            SelectionShape.OutlineThickness = OutlineThickness;
        }