diff options
author | crupest <crupest@outlook.com> | 2018-09-19 22:19:52 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-19 22:19:52 +0800 |
commit | 938391d2e0654bf2f57a67871753a056023e0d2c (patch) | |
tree | ba8beba43ce5f59d33113677414bdc329cbaf56e /CruUI/ui/controls/toggle_button.cpp | |
parent | 85bb4d466efeb2540363065d7c0987a9d60f70e9 (diff) | |
download | cru-938391d2e0654bf2f57a67871753a056023e0d2c.tar.gz cru-938391d2e0654bf2f57a67871753a056023e0d2c.tar.bz2 cru-938391d2e0654bf2f57a67871753a056023e0d2c.zip |
Rename some event functions.
Diffstat (limited to 'CruUI/ui/controls/toggle_button.cpp')
-rw-r--r-- | CruUI/ui/controls/toggle_button.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CruUI/ui/controls/toggle_button.cpp b/CruUI/ui/controls/toggle_button.cpp index 033fa9fc..001f46eb 100644 --- a/CruUI/ui/controls/toggle_button.cpp +++ b/CruUI/ui/controls/toggle_button.cpp @@ -60,6 +60,7 @@ namespace cru::ui::controls const auto time = total_time * (std::abs(delta) / (inner_circle_x * 2)); + // ReSharper disable once CppExpressionWithoutSideEffects AnimationBuilder(fmt::format(L"ToggleButton {}", reinterpret_cast<size_t>(this)), time) .AddStepHandler(CreatePtr<animations::AnimationStepHandlerPtr>([=](animations::AnimationDelegatePtr, const double percentage) { @@ -67,7 +68,7 @@ namespace cru::ui::controls Repaint(); })).Start(); - OnToggleInternal(state); + RaiseToggleEvent(state); Repaint(); } } @@ -139,7 +140,7 @@ namespace cru::ui::controls return result_size; } - void ToggleButton::OnToggleInternal(bool new_state) + void ToggleButton::RaiseToggleEvent(bool new_state) { events::ToggleEventArgs args(this, this, new_state); OnToggle(args); |