Пример #1
0
        public SlidingMessage(string goalText, float tipWidth, float tipHeight)
        {
            dropInHeight  = -tipHeight;
            stayHeight    = App.Height / 2 - tipHeight / 2;
            dropOutHeight = App.Height;
            goalContainer = new Graphics
            {
                Position = new Point(App.Width / 2 - tipWidth / 2, App.Height / 2 - tipHeight / 2)
            };
            goalContainer.LineStyle(2)
            .BeginFill(0x2F9E2F)
            .DrawRoundedRect(0, 0, tipWidth, tipHeight, 10)
            .EndFill();
            var text = new Text(goalText)
            {
                Anchor   = new Point(0.5f, 0.5f),
                Position = new Point(tipWidth / 2, tipHeight / 2)
            };

            goalContainer.AddChild(text);
        }