- icon=i;
-}
-
-void Button::button_press(int, int, unsigned btn)
-{
- if(btn==1)
- {
- pressed=true;
- state|=ACTIVE;
- }
-}
-
-void Button::button_release(int x, int y, unsigned btn)
-{
- if(pressed && btn==1)
- {
- state&=~ACTIVE;
- pressed=false;
-
- if(geom.is_inside_relative(x, y))
- signal_clicked.emit();
- }
-}
-
-void Button::pointer_motion(int x, int y)
-{
- if(pressed)
- {
- if(!geom.is_inside_relative(x, y))
- state&=~ACTIVE;
- else
- state|=ACTIVE;
- }