aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/button.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-12-13 22:25:29 +0800
committercrupest <crupest@outlook.com>2019-12-13 22:25:29 +0800
commit3d3290a60d328b6d2a6d3fc4d8d7483583ed13aa (patch)
tree3e2b75cfb70e96d4b5f4a0b5cb19a8c3cd20cf53 /src/ui/controls/button.cpp
parent9110574bb51e9e2959842a7641f598d34c3cd847 (diff)
downloadcru-3d3290a60d328b6d2a6d3fc4d8d7483583ed13aa.tar.gz
cru-3d3290a60d328b6d2a6d3fc4d8d7483583ed13aa.tar.bz2
cru-3d3290a60d328b6d2a6d3fc4d8d7483583ed13aa.zip
...
Diffstat (limited to 'src/ui/controls/button.cpp')
-rw-r--r--src/ui/controls/button.cpp6
1 files changed, 6 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);