public void BuildInspectorUI(UIBuilder ui)
 {
     WorkerInspector.BuildInspectorUI((Worker)this, ui);
     ui.Button("import EPUB", (button, data) => { ImportEPUB(); });
     output = ui.Text("", true, Alignment.MiddleLeft, false);
     Message("Ready for import...");
 }
 public void BuildInspectorUI(UIBuilder ui)
 {
     WorkerInspector.BuildInspectorUI(this, ui);
     ui.Button("Random Color Particle", (b, e) => { RandomColorGenerator(); });
     ui.Button("Random Alpha Particle", (b, e) => { RandomAlphaGenerator(); });
     ui.Button("Random Color and Alpha Particle", (b, e) => { RandomColorAlphaGenerator(); });
 }
 // We've registered this component as an ICustomInspector, this means we can add stuff to it's inspector UI, Like the "Split"/"Merge" buttons on MeshRenderer.
 public void BuildInspectorUI(UIBuilder ui)
 {
     //Build the standard UI
     WorkerInspector.BuildInspectorUI(this, ui);
     /** Add a button, called "Pull Links", it uses a bunch of wizardry to run the PullLinks method as a task.
      * But I'm not sure if I'm doing this correctly.
      */
     ui.Button("Pull Links", (b, e) => { StartTask(async () => { await PullLinks(); }); });
 }
Exemplo n.º 4
0
        public void BuildInspectorUI(UIBuilder ui)
        {
            WorkerInspector.BuildInspectorUI(this, ui);

            ui.Button("Generate Component and LogiX visuals", GeneratePressed);
            ui.Button("Generate Wiki InfoBoxes and tables", (b, e) => { GenerateInfoBoxes(); });
            ui.Button("Generate Wiki Index pages", (b, e) => { GenerateWikiIndexPages(); });
            ui.Button("Capture Image", (b, e) => { CaptureImage(); });
            componentProgress = ui.Text("0/0", true, Alignment.MiddleCenter, false);
        }
Exemplo n.º 5
0
 public void BuildInspectorUI(UIBuilder ui)
 {
     if (_gradientTexture == null || _gradientTexture.IsDisposed)
     {
         _gradientTexture = ui.Root.AttachComponent <GradientStripTexture>();
         _gradientTexture.Format.Value = TextureFormat.RGB24;
         UpdateGradient();
     }
     WorkerInspector.BuildInspectorUI(this, ui);
     ui.RawImage(_gradientTexture);
     ui.Button("Generate Particle", (b, e) => { GenerateParticle(); });
 }
        private async Task <Rect> BuildComponentUI(Component targetInstance)
        {
            UIBuilder ui = new UIBuilder(VisualSlot, 800, 5000, 0.1f);

            ui.Style.MinHeight         = 30f;
            ui.Style.ForceExpandHeight = false;
            ui.Image(new color(141 / 255.0f, 186 / 255.0f, 104 / 255.0f));
            ui.VerticalLayout(4f, 0, Alignment.TopLeft);
            ui.Style.MinHeight         = 30f;
            ui.Style.PreferredHeight   = 30f;
            ui.Style.ForceExpandHeight = true;
            VerticalLayout content = ui.VerticalLayout(4f, 10f, Alignment.TopLeft);

            ui.Style.ChildAlignment = Alignment.TopLeft;
            {
                ui.HorizontalLayout(4f);
                ui.Style.FlexibleWidth = 1000f;
                ui.Button("<b>" + targetInstance.GetType().GetNiceName() + "</b>", color.White);

                ui.Style.FlexibleWidth = 0.0f;
                ui.Style.MinWidth      = 32f;

                ui.Button("D", MathX.Lerp(color.Green, color.White, 0.7f));
                ui.Button("X", MathX.Lerp(color.Red, color.White, 0.7f));
                ui.NestOut();
            }
            if (targetInstance is ICustomInspector customInspector)
            {
                ui.Style.MinHeight = 24f;
                customInspector.BuildInspectorUI(ui);
            }
            else
            {
                WorkerInspector.BuildInspectorUI(targetInstance, ui);
            }
            await new Updates(5);
            return(content.RectTransform.BoundingRect);
        }
 //Ui is needed
 public void BuildInspectorUI(UIBuilder ui)
 {
     WorkerInspector.BuildInspectorUI(this, ui);
 }