mirror of
https://github.com/AssetRipper/NativeFileDialogs.NET.git
synced 2026-11-13 20:05:46 -10:00
Rename during CppSharp generation
This commit is contained in:
1 parent
3c1b069db6
commit
63afade403
10 files changed
+259
-212
No files matched your search
@@ -7,16 +7,16 @@ using NativeFileDialogs.AutoGen;
|
||||
|
||||
unsafe
|
||||
{
|
||||
nfd.NFD_Init();
|
||||
nfd.Init();
|
||||
|
||||
Nfdu8filteritemT[] filterItem = new[]
|
||||
FilterItemU8[] filterItem = new[]
|
||||
{
|
||||
new Nfdu8filteritemT
|
||||
new FilterItemU8
|
||||
{
|
||||
Name = "Source code",
|
||||
Spec = "c,cpp,cc",
|
||||
},
|
||||
new Nfdu8filteritemT
|
||||
new FilterItemU8
|
||||
{
|
||||
Name = "Headers",
|
||||
Spec = "h,hpp",
|
||||
@@ -24,20 +24,20 @@ unsafe
|
||||
};
|
||||
|
||||
sbyte* outPathPtr;
|
||||
NfdresultT result = nfd.NFD_OpenDialogU8(&outPathPtr, filterItem, (uint)filterItem.Length, null);
|
||||
Result result = nfd.OpenDialogU8(&outPathPtr, filterItem, (uint)filterItem.Length, null);
|
||||
switch (result)
|
||||
{
|
||||
case NfdresultT.NFD_OKAY:
|
||||
case Result.Okay:
|
||||
Console.WriteLine("Success!");
|
||||
Console.WriteLine(new string(outPathPtr));
|
||||
break;
|
||||
case NfdresultT.NFD_CANCEL:
|
||||
case Result.Cancel:
|
||||
Console.WriteLine("User pressed Cancel.");
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine($"Error: {nfd.NFD_GetError()}");
|
||||
Console.WriteLine($"Error: {nfd.GetError()}");
|
||||
break;
|
||||
}
|
||||
|
||||
nfd.NFD_Quit();
|
||||
nfd.Quit();
|
||||
}
|
||||
Reference in new issue
Block a user