Tanoda
GILES.Interface.pb_FileDialog Class Reference
Inheritance diagram for GILES.Interface.pb_FileDialog:

Public Member Functions

void AddOnSaveListener (Callback< string > listener)
 
void AddOnCancelListener (Callback listener)
 
void SetDirectory (string directory)
 
void UpdateDirectoryContents ()
 
void OpenParentDirectory ()
 
void SetFile (string path)
 
void Back ()
 
void Forward ()
 
void Cancel ()
 
void Save ()
 

Static Public Member Functions

static IEnumerable< string > GetFiles (string path, string[] searchPatterns, SearchOption searchOption=SearchOption.TopDirectoryOnly)
 

Public Attributes

bool limitToCourses = false
 Only show training files. More...
 
GameObject scrollContent
 Where to put current directory folder buttons. More...
 
Button saveButton
 Save and cancel buttons. onClick delegates will automatically be added by this script. More...
 
Button cancelButton
 
InputField directoryCrumbsField
 The input field that shows the directory path. More...
 
InputField fileInputField
 The input field that allows user to type in file or folder name. More...
 
string currentDirectory
 The directory currently being inspected. More...
 
Button backButton
 Buttons to navigate folder structures. More...
 
Button forwardButton
 
Button upButton
 
pb_SaveDialogButton rowButtonPrefab
 The prefab to populate scrollview contents with. More...
 
pb_GUIStyle oddRowStyle
 pb_GUIStyle to apply to odd and even rows. More...
 
pb_GUIStyle evenRowStyle
 
Callback< string > OnSave
 
Callback OnCancel
 Called if the user cancels this action. More...
 
CourseType manualLogonCourseType = CourseType.Normal
 

Properties

bool isFileBrowser [get, set]
 
string filePattern [get, set]
 If isFileBrowser is true, this string my be used to filter file results (see https://msdn.microsoft.com/en-us/library/wz42302f(v=vs.110).aspx). More...
 

Detailed Description

Implements a navigable directory window.

See also
pb_Window, pb_ModalWindow

Definition at line 16 of file pb_FileDialog.cs.

Member Function Documentation

◆ AddOnCancelListener()

void GILES.Interface.pb_FileDialog.AddOnCancelListener ( Callback  listener)

Add a callback when this window is canceled.

Definition at line 83 of file pb_FileDialog.cs.

◆ AddOnSaveListener()

void GILES.Interface.pb_FileDialog.AddOnSaveListener ( Callback< string >  listener)

Add a callback when this window is dismissed due to 'Save' being called.

Definition at line 72 of file pb_FileDialog.cs.

◆ Back()

void GILES.Interface.pb_FileDialog.Back ( )

If OpenParentDirectory() has been called, this opens the Directory that it came from.

Definition at line 361 of file pb_FileDialog.cs.

◆ Cancel()

void GILES.Interface.pb_FileDialog.Cancel ( )

Cancel this dialog. Calling script is responsible for closing the modal window in the OnCancel callback.

Definition at line 385 of file pb_FileDialog.cs.

◆ Forward()

void GILES.Interface.pb_FileDialog.Forward ( )

Definition at line 371 of file pb_FileDialog.cs.

◆ GetFiles()

static IEnumerable< string > GILES.Interface.pb_FileDialog.GetFiles ( string  path,
string[]  searchPatterns,
SearchOption  searchOption = SearchOption.TopDirectoryOnly 
)
static

Definition at line 315 of file pb_FileDialog.cs.

◆ OpenParentDirectory()

void GILES.Interface.pb_FileDialog.OpenParentDirectory ( )

Definition at line 342 of file pb_FileDialog.cs.

◆ Save()

void GILES.Interface.pb_FileDialog.Save ( )

Exit dialog and call OnSave with the current file path. Calling script is responsible for closing the modal window in the OnCancel callback.

Definition at line 397 of file pb_FileDialog.cs.

◆ SetDirectory()

void GILES.Interface.pb_FileDialog.SetDirectory ( string  directory)

Set the currently displayed directory.

Definition at line 121 of file pb_FileDialog.cs.

◆ SetFile()

void GILES.Interface.pb_FileDialog.SetFile ( string  path)

Definition at line 352 of file pb_FileDialog.cs.

◆ UpdateDirectoryContents()

void GILES.Interface.pb_FileDialog.UpdateDirectoryContents ( )

Update the contents in the scroll view with the available folders (and optionally files) in the currentDirectory.

Definition at line 144 of file pb_FileDialog.cs.

Member Data Documentation

◆ backButton

Button GILES.Interface.pb_FileDialog.backButton

Buttons to navigate folder structures.

Definition at line 41 of file pb_FileDialog.cs.

◆ cancelButton

Button GILES.Interface.pb_FileDialog.cancelButton

Definition at line 29 of file pb_FileDialog.cs.

◆ currentDirectory

string GILES.Interface.pb_FileDialog.currentDirectory

The directory currently being inspected.

Definition at line 38 of file pb_FileDialog.cs.

◆ directoryCrumbsField

InputField GILES.Interface.pb_FileDialog.directoryCrumbsField

The input field that shows the directory path.

Definition at line 32 of file pb_FileDialog.cs.

◆ evenRowStyle

pb_GUIStyle GILES.Interface.pb_FileDialog.evenRowStyle

Definition at line 47 of file pb_FileDialog.cs.

◆ fileInputField

InputField GILES.Interface.pb_FileDialog.fileInputField

The input field that allows user to type in file or folder name.

Definition at line 35 of file pb_FileDialog.cs.

◆ forwardButton

Button GILES.Interface.pb_FileDialog.forwardButton

Definition at line 41 of file pb_FileDialog.cs.

◆ limitToCourses

bool GILES.Interface.pb_FileDialog.limitToCourses = false

Only show training files.

Definition at line 23 of file pb_FileDialog.cs.

◆ manualLogonCourseType

CourseType GILES.Interface.pb_FileDialog.manualLogonCourseType = CourseType.Normal

Definition at line 67 of file pb_FileDialog.cs.

◆ oddRowStyle

pb_GUIStyle GILES.Interface.pb_FileDialog.oddRowStyle

pb_GUIStyle to apply to odd and even rows.

Definition at line 47 of file pb_FileDialog.cs.

◆ OnCancel

Callback GILES.Interface.pb_FileDialog.OnCancel

Called if the user cancels this action.

Definition at line 65 of file pb_FileDialog.cs.

◆ OnSave

Callback<string> GILES.Interface.pb_FileDialog.OnSave

Called when the user hits the 'Save' button. The passed variable is not checked for validity.

Definition at line 62 of file pb_FileDialog.cs.

◆ rowButtonPrefab

pb_SaveDialogButton GILES.Interface.pb_FileDialog.rowButtonPrefab

The prefab to populate scrollview contents with.

Definition at line 44 of file pb_FileDialog.cs.

◆ saveButton

Button GILES.Interface.pb_FileDialog.saveButton

Save and cancel buttons. onClick delegates will automatically be added by this script.

Definition at line 29 of file pb_FileDialog.cs.

◆ scrollContent

GameObject GILES.Interface.pb_FileDialog.scrollContent

Where to put current directory folder buttons.

Definition at line 26 of file pb_FileDialog.cs.

◆ upButton

Button GILES.Interface.pb_FileDialog.upButton

Definition at line 41 of file pb_FileDialog.cs.

Property Documentation

◆ filePattern

string GILES.Interface.pb_FileDialog.filePattern
getset

If isFileBrowser is true, this string my be used to filter file results (see https://msdn.microsoft.com/en-us/library/wz42302f(v=vs.110).aspx).

Definition at line 56 of file pb_FileDialog.cs.

◆ isFileBrowser

bool GILES.Interface.pb_FileDialog.isFileBrowser
getset

If true, files as well as folders will be displayed. If false, only folders will be shown. This also affects the string returned by OnSave callback.

Definition at line 51 of file pb_FileDialog.cs.


The documentation for this class was generated from the following file: