mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Use u8string in FileDialogDesc
This commit is contained in:
@@ -418,7 +418,7 @@ static bool Browse(bool isSave, char* path, size_t pathSize)
|
||||
|
||||
desc.InitialDirectory = _directory;
|
||||
desc.Type = isSave ? OpenRCT2::Ui::FileDialogType::Save : OpenRCT2::Ui::FileDialogType::Open;
|
||||
desc.DefaultFilename = isSave ? path : "";
|
||||
desc.DefaultFilename = isSave ? path : u8string();
|
||||
|
||||
// Add 'all files' filter. If the number of filters is increased, this code will need to be adjusted.
|
||||
desc.Filters.emplace_back(language_get_string(STR_ALL_FILES), "*");
|
||||
|
||||
@@ -75,8 +75,8 @@ namespace OpenRCT2
|
||||
{
|
||||
struct Filter
|
||||
{
|
||||
std::string Name; // E.g. "Image Files"
|
||||
std::string Pattern; // E.g. "*.png;*.jpg;*.gif"
|
||||
u8string Name; // E.g. "Image Files"
|
||||
u8string Pattern; // E.g. "*.png;*.jpg;*.gif"
|
||||
|
||||
Filter(u8string_view name, u8string_view pattern)
|
||||
: Name(name)
|
||||
@@ -86,9 +86,9 @@ namespace OpenRCT2
|
||||
};
|
||||
|
||||
FileDialogType Type = FileDialogType::Open;
|
||||
std::string Title;
|
||||
std::string InitialDirectory;
|
||||
std::string DefaultFilename;
|
||||
u8string Title;
|
||||
u8string InitialDirectory;
|
||||
u8string DefaultFilename;
|
||||
std::vector<Filter> Filters;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user