Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Properties | List of all members
DirectoryActionGroup Class Reference

This class manages a single collapsable directory element. More...

Inheritance diagram for DirectoryActionGroup:

Public Member Functions

void AddItemToContent (Transform t)
 Adds the item to this directory. More...
 
void Collapse (bool collapseSubdirectories=false, bool ignoreCanvasUpdate=false)
 Collapse this Directory More...
 
void Deselect ()
 Removes the "selected" button effect More...
 
void Expand (bool expandSubdirectories=false, bool ignoreCanvasUpdate=false)
 Expand this Directory More...
 
void ExpandOverride (bool overrideOn)
 Temporarily override the "expanded" state of the directory group. Temporarily activates the "selected" visual effect of the directory group. More...
 
void Initialize (string directoryName, string path, bool startCollapsed, DirectoryController controller, bool isStockDirectory=false, bool isSteamDirectory=false)
 Initializes the Directory. More...
 
bool OnDirectoryClicked (PointerEventData data)
 Sets the directory as "selected" Notifies the directory controller that the current directory has been selected. More...
 
void RemoveItemFromContent (Transform t)
 Removes the item from this directory. More...
 
void Select ()
 Sets the "pushed" button effect More...
 
void SetLabelColor (Color color)
 Sets the text color for the directory object. More...
 
void SetName (string name)
 Sets the displayed name and renames the game object. More...
 
void UpdateContentSize ()
 Updates the content size when the content is edited. More...
 
void UpdateExpansionIcon ()
 Use this after creating or deleting subfolders to notify the folder that it may need to show or hide the expansion icon. More...
 
void UpdateFileCount ()
 Updates the display name of the folder with a parenthetical notication indicating the number of files contained within, e.g., for the "rockets" folder, the display becomes "rockets (7)" More...
 

Public Attributes

bool IsCurrentGame
 Indicates if this item represents the current active game session. More...
 

Properties

List< Transform > ContentItems [get, set]
 Holds objects like this one, each of which represents a subdirectory. More...
 
DirectoryActionGroup GetSelected [get]
 Returns the selected directory object (or subdirectory). Returns null if nothing in this directory hierarchy is selected. More...
 
bool IsExpansionIconVisible [set]
 When set, the "collapse / expand" icon visibility is toggled on or off to match accordingly. More...
 
bool IsSteamDirectory [get, set]
 Indicates if the item represents the "Steam" folder. More...
 
bool IsStockDirectory [get, set]
 Indicates if this item represents the "Stock" folder. More...
 
bool IsTopLevelDirectory [get]
 Indicates if this object is a game-save directory. More...
 
DirectoryActionGroup Parent [get, set]
 Reference to the parent DirectoryActionGroup. Top level items that represent game-save directories, will return null. More...
 
string Path [get, set]
 A string that contains the full path to the directory. More...
 

Detailed Description

This class manages a single collapsable directory element.

Member Function Documentation

void DirectoryActionGroup.AddItemToContent ( Transform  t)
inline

Adds the item to this directory.

void DirectoryActionGroup.Collapse ( bool  collapseSubdirectories = false,
bool  ignoreCanvasUpdate = false 
)
inline

Collapse this Directory

void DirectoryActionGroup.Deselect ( )
inline

Removes the "selected" button effect

void DirectoryActionGroup.Expand ( bool  expandSubdirectories = false,
bool  ignoreCanvasUpdate = false 
)
inline

Expand this Directory

void DirectoryActionGroup.ExpandOverride ( bool  overrideOn)
inline

Temporarily override the "expanded" state of the directory group. Temporarily activates the "selected" visual effect of the directory group.

Passing false as the argument will remove the override.

void DirectoryActionGroup.Initialize ( string  directoryName,
string  path,
bool  startCollapsed,
DirectoryController  controller,
bool  isStockDirectory = false,
bool  isSteamDirectory = false 
)
inline

Initializes the Directory.

Parameters
directoryNameDisplay name of the directory.
pathThe fully qualified path to the directory.
startCollapsedShould this directory be initialized collapsed
bool DirectoryActionGroup.OnDirectoryClicked ( PointerEventData  data)
inline

Sets the directory as "selected" Notifies the directory controller that the current directory has been selected.

void DirectoryActionGroup.RemoveItemFromContent ( Transform  t)
inline

Removes the item from this directory.

void DirectoryActionGroup.Select ( )
inline

Sets the "pushed" button effect

void DirectoryActionGroup.SetLabelColor ( Color  color)
inline

Sets the text color for the directory object.

void DirectoryActionGroup.SetName ( string  name)
inline

Sets the displayed name and renames the game object.

void DirectoryActionGroup.UpdateContentSize ( )
inline

Updates the content size when the content is edited.

void DirectoryActionGroup.UpdateExpansionIcon ( )
inline

Use this after creating or deleting subfolders to notify the folder that it may need to show or hide the expansion icon.

void DirectoryActionGroup.UpdateFileCount ( )
inline

Updates the display name of the folder with a parenthetical notication indicating the number of files contained within, e.g., for the "rockets" folder, the display becomes "rockets (7)"

Member Data Documentation

bool DirectoryActionGroup.IsCurrentGame

Indicates if this item represents the current active game session.

Property Documentation

List<Transform> DirectoryActionGroup.ContentItems
getset

Holds objects like this one, each of which represents a subdirectory.

DirectoryActionGroup DirectoryActionGroup.GetSelected
get

Returns the selected directory object (or subdirectory). Returns null if nothing in this directory hierarchy is selected.

bool DirectoryActionGroup.IsExpansionIconVisible
set

When set, the "collapse / expand" icon visibility is toggled on or off to match accordingly.

bool DirectoryActionGroup.IsSteamDirectory
getset

Indicates if the item represents the "Steam" folder.

bool DirectoryActionGroup.IsStockDirectory
getset

Indicates if this item represents the "Stock" folder.

bool DirectoryActionGroup.IsTopLevelDirectory
get

Indicates if this object is a game-save directory.

DirectoryActionGroup DirectoryActionGroup.Parent
getset

Reference to the parent DirectoryActionGroup. Top level items that represent game-save directories, will return null.

string DirectoryActionGroup.Path
getset

A string that contains the full path to the directory.


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