aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/controls')
-rw-r--r--src/ui/controls/button.cpp6
-rw-r--r--src/ui/controls/flex_layout.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/controls/button.cpp b/src/ui/controls/button.cpp
index b7f972be..75651a1d 100644
--- a/src/ui/controls/button.cpp
+++ b/src/ui/controls/button.cpp
@@ -36,6 +36,8 @@ Button::Button() : click_detector_(this) {
render_object_->SetBorderEnabled(true);
MouseEnterEvent()->Direct()->AddHandler([this](event::MouseEventArgs& args) {
+ CRU_UNUSED(args)
+
if (click_detector_.GetPressingButton() & trigger_button_) {
SetState(ButtonState::Press);
} else {
@@ -44,6 +46,8 @@ Button::Button() : click_detector_(this) {
});
MouseLeaveEvent()->Direct()->AddHandler([this](event::MouseEventArgs& args) {
+ CRU_UNUSED(args)
+
if (click_detector_.GetPressingButton() & trigger_button_) {
SetState(ButtonState::Normal);
} else {
@@ -75,6 +79,8 @@ void Button::OnChildChanged(Control* old_child, Control* new_child) {
}
void Button::OnStateChange(ButtonState oldState, ButtonState newState) {
+ CRU_UNUSED(oldState)
+
switch (newState) {
case ButtonState::Normal:
Set(render_object_.get(), style_.normal);
diff --git a/src/ui/controls/flex_layout.cpp b/src/ui/controls/flex_layout.cpp
index cf6d4aad..6491b180 100644
--- a/src/ui/controls/flex_layout.cpp
+++ b/src/ui/controls/flex_layout.cpp
@@ -44,6 +44,8 @@ void FlexLayout::OnAddChild(Control* child, int position) {
}
void FlexLayout::OnRemoveChild(Control* child, int position) {
+ CRU_UNUSED(child)
+
render_object_->RemoveChild(position);
}
} // namespace cru::ui::controls