aboutsummaryrefslogtreecommitdiff
path: root/CruUI/ui/controls/toggle_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CruUI/ui/controls/toggle_button.cpp')
-rw-r--r--CruUI/ui/controls/toggle_button.cpp5
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);