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
KSP.UI.Screens.DirectoryController Class Reference
Inheritance diagram for KSP.UI.Screens.DirectoryController:

Public Member Functions

void BuildDirectoryUI (EditorFacility editorFacility)
 Called on initialization. This creates the initial UI that reflects the diretory structures (sort of). Note that the folders Ships, saves, VAB, and SPH are never shown. More...
 
void BuildMissionDirectoryUI (EditorFacility editorFacility)
 Called on initialization. This creates the UI for the Missions folders. More...
 
void CraftListUpdate ()
 Tells the craft browser dialog to update the displayed craft based on the current selected directory. More...
 
List< string > ExpansionDirectories ()
 This method returns the path(s) for the stock craft from the expansions. The calling method will still need to append VAB\ or SPH\ prior to loading and saving. More...
 
void InitForCraftSave ()
 This configures the directory folder UI for use in the "save" browser. It removes the Stock directory entry and configures the buttons for "save" and "cancel" More...
 
void OnEnable ()
 
void OnScroll (PointerEventData data)
 
void OverrideDisplay (string path)
 Directory Controller will display the folder that matches the provided path, as well as all parent folders. More...
 
void RestoreDisplay ()
 Restored the displayed folders to their previous "non-override" display state. More...
 
void SelectDirectory (DirectoryActionGroup selectedDirectory)
 Call this to notify a folder that it has been "selected" by the player. The directory will update itself by displaying a highlight bar, and the craft browser is notified to update the displayed file list to show the contents of the selected directory. More...
 
void ShowDirectoryTreeForEditor (EditorFacility facility)
 Shows and Hides the VAB and SPH folders based on the parameter received. More...
 
void Update ()
 
void UpdateAllDirectoryDisplays ()
 Updates the file count suffix on all folders. This should be called when the folder browser is initially created and displayed, or when you have saved or deleted a craft, but do not have the folder location of that craft. More...
 
void UpdateDirectoryDisplay (string path)
 Updates the file count suffix on all folders for the provided path. This should be called when you have saved or deleted a craft, AND you have the folder location of that craft. More...
 
void UpdateDirectoryLayout (GameObject directory)
 Forces the UI to update the layouts for the provide element and all it's ancestors, all the way up to the content area. More...
 

Public Attributes

GameObject CreateDirectoryButton
 
GameObject DeleteDirectoryButton
 
GameObject DirectoryGroupPrefab
 
GameObject DirectoryStructureContent
 
ScrollRect DirectoryStructureScrollView
 
GameObject HiddenDirectoryPrefab
 

Properties

string CurrentSelectedDirectoryPath [get, set]
 
EditorFacility DisplayedFacility [get]
 Indicates whether the player is viewing VAB folders or SPH folders in the craft dialog. More...
 
bool IsPlayerCraftDirectorySelected [get]
 Indicates if the current selected directory is a directory that potentially contains player craft, i.e., a save-game root directory, or a subdirectory within a root directory. When the current selected directory is the "Stock" directory or the "Steam" directory, this returns false. More...
 
bool IsSteamDirectorySelected [get]
 Readonly. Indicates ifthe selected item is the Steam directory. More...
 
static bool IsStockCraftAvailable [get]
 Indicates if stock craft are available in the current game state. This logic returns true in the following conditions: In the mission builder, stock craft are only available when "Include Stock Vessels" is checked In missions, the availability of stock craft depends on how the player setup the mission In Science games, stock craft can be available (if the player configures it). In Career games, stock craft can be available (if the player configures it). In sandbox games, stock craft are always available More...
 
bool IsStockDirectorySelected [get]
 Readonly. Indicates if the selected item is the Stock directory. More...
 
static bool IsTrainingScenario [get]
 Is the current game a Training Scenario More...
 
string MissionCraftPath [get]
 This returns the Ships directory for the current mission. The calling method still needs to append VAB\ or SPH\ prior to loading and saving. E.g., KSP/saves/missions/{mission name}/Ships <– MISSION [PLAYER] E.g., KSP/GameData/SquadExpansion/{expansion name}/Missions/{mission name}/Ships <– MISSION BUILDER More...
 
string StockDirectoryPath [get]
 This method returns the directory path where the game's "stock" craft are stored. The calling method will still need to append VAB\ or SPH\ prior to loading and saving. More...
 

Member Function Documentation

void KSP.UI.Screens.DirectoryController.BuildDirectoryUI ( EditorFacility  editorFacility)
inline

Called on initialization. This creates the initial UI that reflects the diretory structures (sort of). Note that the folders Ships, saves, VAB, and SPH are never shown.

void KSP.UI.Screens.DirectoryController.BuildMissionDirectoryUI ( EditorFacility  editorFacility)
inline

Called on initialization. This creates the UI for the Missions folders.

void KSP.UI.Screens.DirectoryController.CraftListUpdate ( )
inline

Tells the craft browser dialog to update the displayed craft based on the current selected directory.

List<string> KSP.UI.Screens.DirectoryController.ExpansionDirectories ( )
inline

This method returns the path(s) for the stock craft from the expansions. The calling method will still need to append VAB\ or SPH\ prior to loading and saving.

void KSP.UI.Screens.DirectoryController.InitForCraftSave ( )
inline

This configures the directory folder UI for use in the "save" browser. It removes the Stock directory entry and configures the buttons for "save" and "cancel"

void KSP.UI.Screens.DirectoryController.OnEnable ( )
inline
void KSP.UI.Screens.DirectoryController.OnScroll ( PointerEventData  data)
inline
void KSP.UI.Screens.DirectoryController.OverrideDisplay ( string  path)
inline

Directory Controller will display the folder that matches the provided path, as well as all parent folders.

Parameters
path
void KSP.UI.Screens.DirectoryController.RestoreDisplay ( )
inline

Restored the displayed folders to their previous "non-override" display state.

void KSP.UI.Screens.DirectoryController.SelectDirectory ( DirectoryActionGroup  selectedDirectory)
inline

Call this to notify a folder that it has been "selected" by the player. The directory will update itself by displaying a highlight bar, and the craft browser is notified to update the displayed file list to show the contents of the selected directory.

void KSP.UI.Screens.DirectoryController.ShowDirectoryTreeForEditor ( EditorFacility  facility)
inline

Shows and Hides the VAB and SPH folders based on the parameter received.

void KSP.UI.Screens.DirectoryController.Update ( )
inline
void KSP.UI.Screens.DirectoryController.UpdateAllDirectoryDisplays ( )
inline

Updates the file count suffix on all folders. This should be called when the folder browser is initially created and displayed, or when you have saved or deleted a craft, but do not have the folder location of that craft.

void KSP.UI.Screens.DirectoryController.UpdateDirectoryDisplay ( string  path)
inline

Updates the file count suffix on all folders for the provided path. This should be called when you have saved or deleted a craft, AND you have the folder location of that craft.

void KSP.UI.Screens.DirectoryController.UpdateDirectoryLayout ( GameObject  directory)
inline

Forces the UI to update the layouts for the provide element and all it's ancestors, all the way up to the content area.

Member Data Documentation

GameObject KSP.UI.Screens.DirectoryController.CreateDirectoryButton
GameObject KSP.UI.Screens.DirectoryController.DeleteDirectoryButton
GameObject KSP.UI.Screens.DirectoryController.DirectoryGroupPrefab
GameObject KSP.UI.Screens.DirectoryController.DirectoryStructureContent
ScrollRect KSP.UI.Screens.DirectoryController.DirectoryStructureScrollView
GameObject KSP.UI.Screens.DirectoryController.HiddenDirectoryPrefab

Property Documentation

string KSP.UI.Screens.DirectoryController.CurrentSelectedDirectoryPath
getset
EditorFacility KSP.UI.Screens.DirectoryController.DisplayedFacility
get

Indicates whether the player is viewing VAB folders or SPH folders in the craft dialog.

bool KSP.UI.Screens.DirectoryController.IsPlayerCraftDirectorySelected
get

Indicates if the current selected directory is a directory that potentially contains player craft, i.e., a save-game root directory, or a subdirectory within a root directory. When the current selected directory is the "Stock" directory or the "Steam" directory, this returns false.

bool KSP.UI.Screens.DirectoryController.IsSteamDirectorySelected
get

Readonly. Indicates ifthe selected item is the Steam directory.

bool KSP.UI.Screens.DirectoryController.IsStockCraftAvailable
staticget

Indicates if stock craft are available in the current game state. This logic returns true in the following conditions: In the mission builder, stock craft are only available when "Include Stock Vessels" is checked In missions, the availability of stock craft depends on how the player setup the mission In Science games, stock craft can be available (if the player configures it). In Career games, stock craft can be available (if the player configures it). In sandbox games, stock craft are always available

bool KSP.UI.Screens.DirectoryController.IsStockDirectorySelected
get

Readonly. Indicates if the selected item is the Stock directory.

bool KSP.UI.Screens.DirectoryController.IsTrainingScenario
staticget

Is the current game a Training Scenario

string KSP.UI.Screens.DirectoryController.MissionCraftPath
get

This returns the Ships directory for the current mission. The calling method still needs to append VAB\ or SPH\ prior to loading and saving. E.g., KSP/saves/missions/{mission name}/Ships <– MISSION [PLAYER] E.g., KSP/GameData/SquadExpansion/{expansion name}/Missions/{mission name}/Ships <– MISSION BUILDER

string KSP.UI.Screens.DirectoryController.StockDirectoryPath
get

This method returns the directory path where the game's "stock" craft are stored. The calling method will still need to append VAB\ or SPH\ prior to loading and saving.


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