void Start() { if (!objectTarget) { GameObject go = new GameObject("Cam Target"); go.transform.position = transform.position + (transform.forward * distance); objectTarget = go.transform; } highlightedGObject = null; dictAtMaterialShader = new Dictionary <Material, string>(); dictAtChilds = new Dictionary <GameObject, Dictionary <Material, string> >(); dictLastMaterialShader = new Dictionary <Material, string>(); dictLastChilds = new Dictionary <GameObject, Dictionary <Material, string> >(); lastRenderer = null; atRenderer = null; distance = Vector3.Distance(transform.position, objectTarget.position); currentDistance = distance; desiredDistance = distance; //be sure to grab the current rotations as starting points. position = transform.position; rotation = transform.rotation; currentRotation = transform.rotation; desiredRotation = transform.rotation; xDeg = Vector3.Angle(Vector3.right, transform.right); yDeg = Vector3.Angle(Vector3.up, transform.up); targetState = TargetStates.Off; mode = PickerMode.Object; Debug.Log("RHS>>> " + this.name + " " + this.GetType() + " is ready."); }
public SavePicker() { this.InitializeComponent(); this.FileMode = PickerMode.Load; this.iconImageList.Images.Add("Unknown", new System.Drawing.Bitmap(16, 16)); this.careerListView.Items.Clear(); this.careerListView.Items.Add(new ListViewItem() { Text = Properties.Localization.SavePicker_NewCareerLabel, // ReSharper disable LocalizableElement ImageKey = "New", // ReSharper restore LocalizableElement }); this.saveListView.Items.Clear(); this.saveListView.Items.Add(new ListViewItem() { Text = Properties.Localization.SavePicker_NewSaveLabel, // ReSharper disable LocalizableElement ImageKey = "New", // ReSharper restore LocalizableElement }); }
/// <summary>Starts a file picker window! This will create a native /// file picker window if one is available in the current setup, and /// if it is not, it'll create a fallback filepicker build using /// StereoKit's UI. /// /// Flatscreen apps will show traditional file pickers, and UWP has /// an OS provided file picker that works in MR. All others currently /// use the fallback system. /// /// A note for UWP apps, UWP generally does not have permission to /// access random files, unless the user has chosen them with the /// picker! This picker properly handles permissions for individual /// files on UWP, but may have issues with files that reference other /// files, such as .gltf files with external textures. See /// Platform.WriteFile and Platform.ReadFile for manually reading and /// writing files in a cross-platfom manner.</summary> /// <param name="mode">Are we trying to Open a file, or Save a file? /// This changes the appearance and behavior of the picker to support /// the specified action.</param> /// <param name="onSelectFile">This Action will be called with the /// proper filename when the picker has successfully completed! On a /// cancel or close event, this Action is not called.</param> /// <param name="onCancel">If the user cancels the file picker, or /// the picker is closed via FilePickerClose, this Action is called. /// </param> /// <param name="filters">A list of file extensions that the picker /// should filter for. This is in the format of ".glb" and is case /// insensitive.</param> public static void FilePicker(PickerMode mode, Action <string> onSelectFile, Action onCancel, params string[] filters) { _filePickerCallback = FilePickerCallback; _filePickerOnSelect = onSelectFile; _filePickerOnCancel = onCancel; _filePickerOnComplete = null; NativeAPI.platform_file_picker(mode, IntPtr.Zero, _filePickerCallback, FileFilter.List(filters), filters.Length); }
public AkWwiseTreeView(TreeViewState treeViewState, MultiColumnHeader multiColumnHeader, AkWwiseTreeDataSource data) : base(treeViewState, multiColumnHeader) { m_pickerMode = PickerMode.FullPicker; Initialize(data); Reload(); }
public AkWwiseTreeView(TreeViewState treeViewState, AkWwiseTreeDataSource data, WwiseObjectType componentType) : base(treeViewState) { m_pickerMode = PickerMode.ComponentPicker; componentObjectType = componentType; Initialize(data); data.LoadComponentData(componentObjectType); Reload(); }
public void chooseOnEnvironment() { if (targetState == TargetStates.Off) { targetState = TargetStates.Set; mode = PickerMode.Position; } else { highlightMode(); } }
private static PickerCell CreatePicker(string text, string itemsBinding, PickerMode mode, string subtext = "", string commandBinding = null) { var cell = new PickerCell(); cell.Text = text; cell.SetBinding(PickerCell.PickerItemsProperty, itemsBinding); cell.Mode = mode; cell.SubText = subtext; if (commandBinding != null) { cell.SetBinding(PickerCell.EmptyCommandProperty, commandBinding); } return(cell); }
public ObjectPicker(string galaxy, PickerMode mode) { InitializeComponent(); _galaxy = galaxy; _mode = mode; }
public void highlightMode() { targetState = TargetStates.Off; mode = PickerMode.Object; }