if(btn==1)
{
pressed=true;
- state=ACTIVE;
+ state|=ACTIVE;
}
}
if(pressed && btn==1)
{
if(geom.is_inside_relative(x, y))
- {
- state=HOVER;
signal_clicked.emit();
- }
- else
- state=NORMAL;
+ state&=~ACTIVE;
pressed=false;
}
}
-void Button::pointer_enter()
-{
- state=HOVER;
-}
-
void Button::pointer_leave()
{
- state=NORMAL;
+ Widget::pointer_leave();
+ state&=~ACTIVE;
}
void Button::render_special(const Part &part) const