diff options
Diffstat (limited to 'src/bookmouse.cpp')
-rw-r--r-- | src/bookmouse.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/bookmouse.cpp b/src/bookmouse.cpp index d367af1..d6c5490 100644 --- a/src/bookmouse.cpp +++ b/src/bookmouse.cpp @@ -5,6 +5,7 @@ #include <SDL_opengl.h> #include <atomic> +#include <fud_assert.hpp> #include <fud_array.hpp> #include <fud_directory.hpp> #include <spdlog/spdlog.h> @@ -12,7 +13,7 @@ namespace bookmouse { -using fud::FudStatus; +using fud::assertFail; constexpr const char* OpenDialogHandle = "Open File"; @@ -101,15 +102,9 @@ void Bookmouse::updateState() ImGui::SetNextWindowSize(m_imgui.getIO().DisplaySize); auto stateResult = ImBegin( "My First Tool", - &m_running, // Is this right? + &m_running, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_MenuBar); - IM_ASSERT(stateResult); - - // m_imgui.getIO().AddKeyEvent() - - // if (ImGui::IsKeyPressed(ImGuiKey_O) && m_imgui.getIO().KeyCtrl && !m_openDialog) { - // m_openDialog = true; - // } + fudAssert(stateResult); if (ImMenuBar menuBar{}) { IM_ASSERT(menuBar); @@ -172,6 +167,7 @@ void Bookmouse::openDialog() if (m_fileDialog == nullptr) { m_fileDialog = std::make_unique<FileDialog>(m_directoryName, m_timeFormat); if (!m_fileDialog->valid()) { + spdlog::error("WHAT {}", m_directoryName.c_str()); m_openDialog = false; ImGui::CloseCurrentPopup(); } |