Beispiel #1
0
        public BoldWidgetBad(ParentWidget parentWidget, string text)
        {
            Match match = this.pattern.Matcher(text);

            match.NextMatch();
            this.ControlAdded += BoldWidget_ControlAdded;
        }
Beispiel #2
0
        public BoldWidget(ParentWidget parent, string text)
        {
            Matcher match = Pattern1.matcher(text);

            match.find();
            addChildWidgets(match.group(1));
        }
 public WidgetBuilderThread(WidgetBuilder widgetBuilder, string text, ParentWidget parent, AtomicBoolean failFlag)
 {
     this.widgetBuilder = widgetBuilder;
     this.text = text;
     this.parent = parent;
     this.failFlag = failFlag;
 }
 public WidgetBuilderThread(WidgetBuilder widgetBuilder, string text, ParentWidget parent, AtomicBoolean failFlag)
 {
     this.widgetBuilder = widgetBuilder;
     this.text          = text;
     this.parent        = parent;
     this.failFlag      = failFlag;
 }
Beispiel #5
0
 public bool IsChildWidgetOf(ContainerWidget containerWidget)
 {
     if (containerWidget == ParentWidget)
     {
         return(true);
     }
     if (ParentWidget == null)
     {
         return(false);
     }
     return(ParentWidget.IsChildWidgetOf(containerWidget));
 }
 void taskMenu_Showing(object sender, EventArgs e)
 {
     if (adImage == null)
     {
         adImage      = (ImageBox)ParentWidget.createWidgetT("ImageBox", "ImageBox", 2, taskMenu.AdTop, AdWidth, AdHeight, Align.Left | Align.Top, "");
         rocketWidget = new RocketWidget(adImage, false);
         openRml();
         Right = adImage.Right;
         Top   = HorizontalAdHeight;
         fireAdCreated();
         taskMenu.Showing -= taskMenu_Showing;
     }
 }
Beispiel #7
0
        // CalculateTransform
        private void CalculateTransform()
        {
            if (!IsFlagSet(E_WidgetFlag.DirtyMatrix))
            {
                return;
            }

            TransformMatrix = Matrix.Identity;

            if ((ParentWidget == null) && (Scale.X == 1.0f) && (Scale.Y == 1.0f) && (Rotation.X == 0.0f) && (Rotation.Y == 0.0f) && (Rotation.Z == 0.0f))
            {
                FlagClear(E_WidgetFlag.UseMatrix);
                TransformMatrix.Translation = Position;
            }
            else
            {
                FlagSet(E_WidgetFlag.UseMatrix);

                Matrix s = Matrix.CreateScale(Scale.X, Scale.Y, 1.0f);
                Matrix r = Matrix.CreateFromYawPitchRoll(Rotation.Y * 0.01745329f, Rotation.X * 0.01745329f, Rotation.Z * 0.01745329f);

                Matrix.Multiply(ref TransformMatrix, ref s, out TransformMatrix);
                Matrix.Multiply(ref TransformMatrix, ref r, out TransformMatrix);

                if (ParentWidget != null)
                {
                    ParentWidget.CalculateTransform();

                    TransformMatrix.Translation = Position + new Vector3(new Vector2(ParentWidget.Size.X, ParentWidget.Size.Y) * (_UI.Sprite.GetVertexOffsetAligned(RenderPass, ParentAttach)
                                                                                                                                  - _UI.Sprite.GetVertexOffsetAligned(ParentWidget.RenderPass, ParentWidget.Align)), 0.0f);

                    Matrix.Multiply(ref TransformMatrix, ref ParentWidget.TransformMatrix, out TransformMatrix);
                }
                else
                {
                    TransformMatrix.Translation = Position;
                }
            }

            FlagClear(E_WidgetFlag.DirtyMatrix);
        }