public sealed class DesktopDialogsMessage boxes, which SDL has, and file pickers, which it does not.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
SDL 2 ships no file dialog — SDL 3 added one, and the version of Silk.NET this repository pins binds SDL 2 (see the README). A picker is also the one dialog that most needs to be the platform's own, since it carries the user's places, tags, cloud providers and, inside a sandbox, the permission to read what was picked. Writing a drawn substitute here would be strictly worse than the per-OS implementations docs/plan/02 already reserves a project for, so the methods return "nothing chosen" until those exist.
Message boxes are implemented properly, including the button sets, because SDL's are the OS's own and they are what a fatal-error path needs before there is a renderer to draw with.
Methods (6)
public DesktopDialogs(Sdl sdl)Message boxes, which SDL has, and file pickers, which it does not.
public ValueTask<string?> OpenFileAsync(FileDialogOptions options, IWindow? owner = null, CancellationToken cancellationToken = default(CancellationToken))Not implemented on SDL 2. Returns .
public ValueTask<IReadOnlyList<string>> OpenFilesAsync(FileDialogOptions options, IWindow? owner = null, CancellationToken cancellationToken = default(CancellationToken))Not implemented on SDL 2. Returns an empty list.
public ValueTask<string?> SaveFileAsync(FileDialogOptions options, IWindow? owner = null, CancellationToken cancellationToken = default(CancellationToken))Not implemented on SDL 2. Returns .
public ValueTask<string?> OpenFolderAsync(FileDialogOptions options, IWindow? owner = null, CancellationToken cancellationToken = default(CancellationToken))Not implemented on SDL 2. Returns .
public ValueTask<MessageBoxResult> ShowMessageAsync(MessageBoxOptions options, IWindow? owner = null, CancellationToken cancellationToken = default(CancellationToken))Shows a message box and waits for an answer.
Used by (2)
- DesktopPlatformVixen.Platform.Desktop
- DesktopSupplementTestsVixen.Platform.Desktop.Tests