Skip to content

Legacy: PopFileOpenDialog routine

Archie_UwU edited this page Nov 19, 2023 · 1 revision

You are reading the documentation of YYToolkit Legacy (v2.x.x) - for documentation on current-gen YYTK, see the Homepage.


Creates a native file select dialog using the Portable-File-Dialogs API.

Syntax

void PopFileOpenDialog(
    const std::string& WindowTitle,
    const std::string& InitialPath,
    const std::vector<std::string>& Filters,
    bool AllowMultiselect,
    std::vector<std::string>& outSelected
);

Example look

TODO

Parameters

WindowTitle

The name of the window, displayed next to the control elements (like the close / X button).

InitialPath

The path to begin in. It may be either an absolute path, or a relative path.

Should the path be relative, it's relative to the game installation directory.

Filters

The files available for selection. The default is { "All Files", "*" }, but you may declare other options through pairs, such as:

PopToastNotification(
    "My Window Name", 
    "C:\\Windows", 
    { "Executables", "*.exe *.com", "All Files", "*"},
    false,
    myResultVector
);

Doing this would give you two types available for selection: All Files, and Executables, with extensions .exe or .com.

AllowMultiselect

If this is set to true, more files may be selected by the user by holding CTRL.

The result vector might have more than 1 element if this is the case.

outSelected

The absolute paths to selected files.

For example, one path would be C:\\Windows\\system32\\cmd.exe.

Quick Access

Documentation

Writeups

Clone this wiki locally