From fb1b16cd0ab189d61efe6237b2c2b1f7f72f90de Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 5 Nov 2018 23:25:57 +0800 Subject: Develop cursor. --- src/application.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index 7be56f56..79aaf38d 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -103,9 +103,9 @@ namespace cru { void LoadSystemCursor(HINSTANCE h_instance) { - ui::cursors[ui::cursor_arrow_key] = std::make_shared(::LoadCursorW(h_instance, MAKEINTRESOURCEW(IDC_ARROW)), false); - ui::cursors[ui::cursor_hand_key] = std::make_shared(::LoadCursorW(h_instance, MAKEINTRESOURCEW(IDC_HAND)), false); - ui::cursors[ui::cursor_i_beam_key] = std::make_shared(::LoadCursorW(h_instance, MAKEINTRESOURCEW(IDC_IBEAM)), false); + ui::cursors::arrow = std::make_shared(::LoadCursorW(nullptr, MAKEINTRESOURCEW(IDC_ARROW)), false); + ui::cursors::hand = std::make_shared(::LoadCursorW(nullptr, MAKEINTRESOURCEW(IDC_HAND)), false); + ui::cursors::i_beam = std::make_shared(::LoadCursorW(nullptr, MAKEINTRESOURCEW(IDC_IBEAM)), false); } } @@ -137,8 +137,6 @@ namespace cru { Application::~Application() { - ui::cursors.clear(); - animation_manager_.reset(); instance_ = nullptr; } -- cgit v1.2.3