From 938391d2e0654bf2f57a67871753a056023e0d2c Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 19 Sep 2018 22:19:52 +0800 Subject: Rename some event functions. --- CruUI/ui/controls/toggle_button.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CruUI/ui/controls/toggle_button.cpp') 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(this)), time) .AddStepHandler(CreatePtr([=](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); -- cgit v1.2.3