diff options
author | crupest <crupest@outlook.com> | 2018-09-19 01:15:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-19 01:15:01 +0800 |
commit | 85bb4d466efeb2540363065d7c0987a9d60f70e9 (patch) | |
tree | ea5e5aa738afb37a2d3bc4e74f9be64c15f3d188 /CruUI/application.cpp | |
parent | 4710715102df3806479985679bd8048631ccaab5 (diff) | |
download | cru-85bb4d466efeb2540363065d7c0987a9d60f70e9.tar.gz cru-85bb4d466efeb2540363065d7c0987a9d60f70e9.tar.bz2 cru-85bb4d466efeb2540363065d7c0987a9d60f70e9.zip |
finish animation!!!
Diffstat (limited to 'CruUI/application.cpp')
-rw-r--r-- | CruUI/application.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CruUI/application.cpp b/CruUI/application.cpp index f1d57153..78b44d7e 100644 --- a/CruUI/application.cpp +++ b/CruUI/application.cpp @@ -2,6 +2,7 @@ #include <fmt/format.h> +#include "exception.h" #include "timer.h" #include "ui/window.h" #include "graph/graph.h" @@ -96,13 +97,14 @@ namespace cru { window_manager_ = std::make_unique<ui::WindowManager>(); graph_manager_ = std::make_unique<graph::GraphManager>(); timer_manager_ = std::make_unique<TimerManager>(); - animation_manager_ = std::make_unique<ui::animations::AnimationManager>(); + animation_manager_ = std::make_unique<ui::animations::details::AnimationManager>(); god_window_ = std::make_unique<GodWindow>(this); } Application::~Application() { + animation_manager_.reset(); instance_ = nullptr; } @@ -128,6 +130,6 @@ namespace cru { auto p_action_copy = new InvokeLaterAction(std::move(action)); if (PostMessageW(Application::GetInstance()->GetGodWindow()->GetHandle(), invoke_later_message_id, reinterpret_cast<WPARAM>(p_action_copy), 0) == 0) - throw std::runtime_error(fmt::format("Last error: {}.", ::GetLastError())); + throw Win32Error(::GetLastError(), "InvokeLater failed to post message."); } } |