コード例 #1
0
 private void StereoModeChoiceAction(ChoiceItem selected)
 {
     if (stereoModes.ContainsKey(selected.Label))
     {
         CurrentStereoMode = stereoModes[selected.Label];
     }
 }
コード例 #2
0
 private void FocusChoiceAction(ChoiceItem selected)
 {
     if (selected.Label == "AutoFocus")
     {
         AutoFocus = true;
     }
     else
     {
         AutoFocus = false;
     }
 }
コード例 #3
0
ファイル: Choice.cs プロジェクト: tksuoran/renderstack_net
        public void Add(ChoiceItem item)
        {
            item.Connect(this);
            switch (Orientation)
            {
            case Orientation.Horizontal: item.PushButton.LayoutStyle = AreaLayoutStyle.ExtendVertical; break;

            case Orientation.Vertical: item.PushButton.LayoutStyle = AreaLayoutStyle.ExtendHorizontal; break;
            }
            items.Add(item);
            base.Add(item.PushButton);
        }
コード例 #4
0
 private void ProjectionChoiceAction(ChoiceItem selected)
 {
     if (selected.Label == "Vertical")
     {
         sceneManager.Camera.ProjectionType = ProjectionType.PerspectiveVertical;
     }
     else if (selected.Label == "Horizontal")
     {
         sceneManager.Camera.ProjectionType = ProjectionType.PerspectiveHorizontal;
     }
     else if (selected.Label == "V. Stereo")
     {
         sceneManager.Camera.ProjectionType = ProjectionType.StereoscopicVertical;
     }
     else if (selected.Label == "H. Stereo")
     {
         sceneManager.Camera.ProjectionType = ProjectionType.StereoscopicHorizontal;
     }
 }
コード例 #5
0
        private Area Materials()
        {
            if (materialManager == null)
            {
                return(null);
            }

            Button expand = new Button(renderer, "Materials");

            expand.Action = TogglePopup;

            MenuList list  = new MenuList(renderer, Orientation.Vertical);
            Popup    popup = new Popup(expand, list);

            Button collapse = new Button(renderer, "Materials");

            collapse.Action = TogglePopup;
            collapse.Link   = popup;

            list.Add(collapse);
            list.ChildLayoutStyle = Area.AreaLayoutStyle.ExtendHorizontal;

            Choice choice = new Choice(Orientation.Vertical);

            choice.Style = Style.NullPadding;
            //choice.Action = MaterialChoiceAction;
            string[] materials = { "pearl", "gold", "red", "green", "cyan", "blue", "magenta", "pink", "EdgeLines", "Grid" };

            foreach (var name in materials)
            {
                ChoiceItem item = new ChoiceItem(renderer, name);
                choice.Add(item);
            }
            choice.Selected = choice.Items.First();
            list.Add(choice);

            expand.Link = popup;
            return(popup);
        }