コード例 #1
0
ファイル: ImagePanelContents.cs プロジェクト: KIT-ISAS/iviz
        void Awake()
        {
            DataPanelWidgets p = GetComponent <DataPanelWidgets>();

            p.AddHeadTitleWidget("Image");
            Listener    = p.AddListener();
            Frame       = p.AddFrame();
            Description = p.AddDataLabel("").SetHasRichText(true).SetAlignment(TextAnchor.MiddleCenter);;
            Colormap    = p.AddDropdown("Colormap")
                          .SetOptions(Resource.Colormaps.Names)
                          .SetIndex((int)ColormapId.gray);
            Min        = p.AddSlider("Colormap Min").SetMinValue(0).SetMaxValue(1);
            Max        = p.AddSlider("Colormap Max").SetMinValue(0).SetMaxValue(1);
            FlipMinMax = p.AddToggle("Flip Min/Max");

            PreviewWidget = p.AddImagePreviewWidget("Preview");

            ShowBillboard          = p.AddToggle("Show As Billboard");
            BillboardSize          = p.AddSlider("Billboard Size").SetMinValue(0.1f).SetMaxValue(10);
            BillboardFollowsCamera = p.AddToggle("Billboard Points To You");
            BillboardOffset        = p.AddVector3Slider("Billboard Offset");

            billboard = p.AddCollapsibleWidget("Billboard")
                        .Attach(ShowBillboard)
                        .Attach(BillboardSize)
                        .Attach(BillboardFollowsCamera)
                        .Attach(BillboardOffset)
                        .UpdateSize();

            CloseButton = p.AddTrashButton();
            HideButton  = p.AddHideButton();
            p.UpdateSize();
            gameObject.SetActive(false);
        }
コード例 #2
0
        void Awake()
        {
            DataPanelWidgets p = GetComponent <DataPanelWidgets>();

            p.AddHeadTitleWidget("DepthCloud");
            DepthTopic = p.AddListener();
            //DepthInfoTopic = p.AddListener();
            ColorTopic   = p.AddListener();
            Frame        = p.AddFrame();
            Description  = p.AddDataLabel("").SetHasRichText(true).SetAlignment(TextAnchor.MiddleCenter);;
            Depth        = p.AddInputFieldWithHints("Depth Topic");
            Color        = p.AddInputFieldWithHints("Color Topic");
            DepthPreview = p.AddImagePreviewWidget("Depth Preview");
            ColorPreview = p.AddImagePreviewWidget("Color Preview");
            CloseButton  = p.AddTrashButton();
            HideButton   = p.AddHideButton();
            p.UpdateSize();
            gameObject.SetActive(false);
        }