Module CorsixTH.CorsixTH.Lua.dialogs.resizables.directory_browser

A tree node representing a directory in the physical file-system.

Functions

InstallDirTreeNode:InstallDirTreeNode (path) This tree only shows directories and highlights valid TH directories.
InstallDirTreeNode:getHighlightColour (canvas) Check whether this node is a valid install selection.
InstallDirTreeNode:isValidFile (name) Test whether this file node is a directory or iso file.
UIDirectoryBrowser:UIDirectoryBrowser (ui, mode, instruction, treenode_class, callback) Creates a new directory browser window for the Theme Hospital install directory.


Functions

InstallDirTreeNode:InstallDirTreeNode (path)
This tree only shows directories and highlights valid TH directories.

Parameters:

  • path
InstallDirTreeNode:getHighlightColour (canvas)
Check whether this node is a valid install selection.

Sets self.is_valid_directory to true if the selection is valid.

Parameters:

  • canvas

Returns:

    (colour) A highlight colour if the node is a valid selection, or nil otherwise.
InstallDirTreeNode:isValidFile (name)
Test whether this file node is a directory or iso file.

Parameters:

  • name Check parent criteria and that it's a directory.

Returns:

    (bool) true if directory or iso, false otherwise
UIDirectoryBrowser:UIDirectoryBrowser (ui, mode, instruction, treenode_class, callback)
Creates a new directory browser window for the Theme Hospital install directory.

Parameters:

  • ui The active UI to hook into.
  • mode Whether the dialog has been opened from the main_menu or somewhere else. Currently valid are "menu" or "dir_browser".
  • instruction The textual instruction what the user should do in the dialog.
  • treenode_class What TreeNode subclass the nodes will be built from. E.g. "InstallDirTreeNode"
  • callback The function that is called when the user has chosen a directory. Gets a path string as argument.
generated by LDoc TESTING Last updated 2015-01-01 12:00:00