From 6f44617d0a378d980de71e6a5e1d634bff95bbcb Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sat, 28 Sep 2024 20:32:18 -0500 Subject: Flesh out dialog. --- src/file_dialog.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/file_dialog.hpp') diff --git a/src/file_dialog.hpp b/src/file_dialog.hpp index 9709ec0..6a787b3 100644 --- a/src/file_dialog.hpp +++ b/src/file_dialog.hpp @@ -57,9 +57,7 @@ constexpr char DirEntryTypeToChar(DirEntryType entryType) return entryLetter; } -using FilePickerResult = fud::Result< - std::vector, - fud::FudStatus>; +using FilePickerResult = std::optional>; class FileDialog { @@ -74,6 +72,10 @@ public: return m_valid; } + constexpr bool canceled() const { + return m_canceled; + } + private: fud::FudStatus getDirectoryContents(); @@ -84,6 +86,7 @@ private: std::vector m_directoryContents{}; bool m_valid{false}; + bool m_canceled{false}; bool m_typeSelected{false}; bool m_nameSelectede{false}; -- cgit v1.2.3