diff options
author | crupest <crupest@outlook.com> | 2020-07-05 23:06:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-07-05 23:06:02 +0800 |
commit | 5c805e494425a88da1813902b1ad8a1ab351e30d (patch) | |
tree | be3cfd96dcac19db3e256d610d48b5083c489a6c /src/ui/ClickDetector.cpp | |
parent | bbec59718bf8a824583869126762013112f8e568 (diff) | |
download | cru-5c805e494425a88da1813902b1ad8a1ab351e30d.tar.gz cru-5c805e494425a88da1813902b1ad8a1ab351e30d.tar.bz2 cru-5c805e494425a88da1813902b1ad8a1ab351e30d.zip |
...
Diffstat (limited to 'src/ui/ClickDetector.cpp')
-rw-r--r-- | src/ui/ClickDetector.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/ClickDetector.cpp b/src/ui/ClickDetector.cpp index 93e6f303..09f208cd 100644 --- a/src/ui/ClickDetector.cpp +++ b/src/ui/ClickDetector.cpp @@ -45,7 +45,7 @@ ClickDetector::ClickDetector(Control* control) { this->state_ == ClickState::Hover) { if (!this->control_->CaptureMouse()) { log::TagDebug(log_tag, - "Failed to capture mouse when begin click."); + u"Failed to capture mouse when begin click."); return; } this->down_point_ = args.GetPoint(); @@ -107,21 +107,21 @@ void ClickDetector::SetTriggerButton(MouseButton trigger_button) { void ClickDetector::SetState(ClickState state) { #ifdef CRU_DEBUG - auto to_string = [](ClickState state) -> std::string_view { + auto to_string = [](ClickState state) -> std::u16string_view { switch (state) { case ClickState::None: - return "None"; + return u"None"; case ClickState::Hover: - return "Hover"; + return u"Hover"; case ClickState::Press: - return "Press"; + return u"Press"; case ClickState::PressInactive: - return "PressInvactive"; + return u"PressInvactive"; default: UnreachableCode(); } }; - log::TagDebug(log_tag, "Click state changed, new state: {}.", + log::TagDebug(log_tag, u"Click state changed, new state: {}.", to_string(state)); #endif |