Exemplo n.º 1
0
 /// <summary>
 /// Selects the file button, does not finish the file selecting, use ApplyFile to finish selecting file
 /// </summary>
 /// <param name="button">Selected file button</param>
 public void SelectFile(SelectFileDialogFileButton button)
 {
     UnselectFile();
     selectedFile = button;
     selectedFile.Select();
     customFileNameInputField.SetTextWithoutNotify(selectedFile.title.text);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Unselects current file button
 /// </summary>
 public void UnselectFile()
 {
     if (selectedFile == null)
     {
         return;
     }
     selectedFile.Unselect();
     selectedFile = null;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Clears whole grid of the file buttons
        /// </summary>
        private void ClearFilesGrid()
        {
            //Clear files grid
            if (selectedFile != null)
            {
                selectedFile.Unselect();
            }
            selectedFile = null;
            for (var i = filesButtons.Count - 1; i >= 0; i--)
            {
                var fileButton = filesButtons[i];
                ScenarioManager.Instance.prefabsPools.ReturnInstance(fileButton.gameObject);
            }

            filesButtons.Clear();
        }