1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Close #12435: Refactor FILEDIALOG_TYPE to use strong enum (#13072)

* Close #12435: Refactor FILEDIALOG_TYPE to use strong enum
This commit is contained in:
Mike Jones
2020-10-03 02:43:06 +01:00
committed by GitHub
parent 8800c32e52
commit 4c26fb09b3
2 changed files with 5 additions and 5 deletions

View File

@@ -403,7 +403,7 @@ static bool browse(bool isSave, char* path, size_t pathSize)
}
desc.initial_directory = _directory;
desc.type = isSave ? FD_SAVE : FD_OPEN;
desc.type = isSave ? FileDialogType::Save : FileDialogType::Open;
desc.default_filename = isSave ? path : nullptr;
// Add 'all files' filter. If the number of filters is increased, this code will need to be adjusted.

View File

@@ -64,15 +64,15 @@ struct rct2_time
uint8_t second;
};
enum FILEDIALOG_TYPE
enum class FileDialogType : uint8_t
{
FD_OPEN,
FD_SAVE
Open,
Save
};
struct file_dialog_desc
{
uint8_t type;
FileDialogType type;
const utf8* title;
const utf8* initial_directory;
const utf8* default_filename;