Exemplo n.º 1
0
        public SpeechBubbleShape(
            Vector2f dimension,
            float radius,
            float outlineThickness,
            Color backgroundColor,
            Color outlineColor,
            Boolean tipMode = false,
            BorderType tipBorderType = DEFAULT_TIP_BORDER_TYPE,
            Boolean shadowMode = false,
            float shadowOffset = DEFAULT_SHADOW_OFFSET,
            float tipPosition = DEFAULT_TIP_POSITION,
            float tipSize = DEFAULT_TIP_SIZE)
        {
            Background = new Shape();
            Background.EnableFill(true);
            Background.EnableOutline(true);
            Tip = new Shape();
            Tip.EnableFill(true);

            Effect = new Shape();
            Effect.EnableFill(true);
            Effect.EnableOutline(true);
            EffectTip = new Shape();

            ShadowEffect = new Shape();
            ShadowEffect.EnableFill(true);
            ShadowEffect.EnableOutline(true);
            ShadowEffectTip = new Shape();
            ShadowEffectTip.EnableFill(true);
            ShadowEffectTip.EnableOutline(false);

            Dimension = dimension;

            ShadowMode = shadowMode;
            ShadowOffset = new Vector2f(shadowOffset, shadowOffset);

            Radius = radius;
            OutlineThickness = outlineThickness;

            AdjustSize();

            TipMode = tipMode;
            TipBorderType = tipBorderType;

            BackgroundColor = backgroundColor;
            BackgroundColor.A = BACKGROUND_COLOR_ALPHA;
            OutlineColor = outlineColor;
            OutlineColor.A = BACKGROUND_COLOR_ALPHA;

            Background.OutlineThickness = OutlineThickness;
            Effect.OutlineThickness = OutlineThickness;
            ShadowEffect.OutlineThickness = OutlineThickness;

            TipPosition = tipPosition;
            TipSize = tipSize;

            Build();
        }
Exemplo n.º 2
0
        public CombatCursorShape(uint size = CombatMap.CELL_SIZE)
            : base()
        {
            Size = (uint)(size * PERCENTAGE_SCALE_FACTOR / 100D);

            SideSquare = new Shape();
            SideSquare.EnableFill(false);
            SideSquare.EnableOutline(true);
            SideSquare.OutlineThickness = 2;

            CenterSquare = new Shape();
            CenterSquare.EnableFill(true);
            CenterSquare.EnableOutline(true);
            CenterSquare.OutlineThickness = 1;

            Build();
        }
Exemplo n.º 3
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;
        }