Module CorsixTH.CorsixTH.Lua.dialogs.resizables.file_browser

A tree node representing a file (or directory) in the physical file-system that meets a given file extension criterion.

Functions

FilteredTreeControl:FilteredTreeControl (root, x, y, width, height, col_bg, col_fg, has_font, show_dates) A sortable tree control that accommodates a certain file type and also possibly shows their last modification dates.
FilteredTreeControl:sortBy (sort_by, order) Sorts the list according to the given parameters.
UIFileBrowser:UIFileBrowser (ui, mode, title, vertical_size, root, show_dates) A file browser with a scrollbar.
UIFileBrowser:checkChoice (node) Check selection is a valid file, and not a directory
UIFileBrowser:choiceMade (name) Function stub for dialogs to override.
UIFileBrowser:setInputValue (label) Function stub for dialogs with user input option.


Functions

FilteredTreeControl:FilteredTreeControl (root, x, y, width, height, col_bg, col_fg, has_font, show_dates)
A sortable tree control that accommodates a certain file type and also possibly shows their last modification dates.

Parameters:

  • root
  • x
  • y
  • width
  • height
  • col_bg
  • col_fg
  • has_font
  • show_dates
FilteredTreeControl:sortBy (sort_by, order)
Sorts the list according to the given parameters.

Parameters:

  • sort_by Either "name" or "date".
  • order Either "ascending" or "descending"
UIFileBrowser:UIFileBrowser (ui, mode, title, vertical_size, root, show_dates)
A file browser with a scrollbar. Used by load_game and save_game.

Parameters:

  • ui (UI) The active ui.
  • mode (string) Either "menu" or "game" depending on which mode the game is in right now.
  • title (string) The desired title of the dialog.
  • vertical_size
  • root
  • show_dates
UIFileBrowser:checkChoice (node)
Check selection is a valid file, and not a directory

Parameters:

  • node (table) user selected element
UIFileBrowser:choiceMade (name)
Function stub for dialogs to override. This function is called each time a file is chosen.

Parameters:

  • name (string) Name of the file chosen.
UIFileBrowser:setInputValue (label)
Function stub for dialogs with user input option. This will be called for updating inputs, override it for a proper implementation in the derived class.

Parameters:

  • label (string) Name of the file chosen
generated by LDoc TESTING Last updated 2015-01-01 12:00:00