+ if (p && !_pressed && e.x > 0 && e.y > 0 &&
+ e.x < area().width() && e.y < area().height())
+ clickHandler(_mouse_button);
+}
+
+void Button::styleChanged(const RenderStyle &style)
+{
+ if (isHighlighted()) {
+ if (_pressed)
+ _texture = style.buttonPressFocusBackground();
+ else
+ _texture = style.buttonUnpressFocusBackground();
+ _forecolor = style.buttonFocusColor();
+ } else {
+ if (_pressed)
+ _texture = style.buttonPressUnfocusBackground();
+ else
+ _texture = style.buttonUnpressUnfocusBackground();
+ _forecolor = style.buttonUnfocusColor();
+ }
+ refresh();