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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user