private void StereoModeChoiceAction(ChoiceItem selected) { if (stereoModes.ContainsKey(selected.Label)) { CurrentStereoMode = stereoModes[selected.Label]; } }
private void FocusChoiceAction(ChoiceItem selected) { if (selected.Label == "AutoFocus") { AutoFocus = true; } else { AutoFocus = false; } }
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); }
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; } }
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); }