+void OBButtonWidget::setTextures()
+{
+ switch (type()) {
+ case Type_LeftGrip:
+ case Type_RightGrip:
+ if (_focused)
+ setTexture(_style->getGripFocus());
+ else
+ setTexture(_style->getGripUnfocus());
+ break;
+ case Type_StickyButton:
+ case Type_CloseButton:
+ case Type_MaximizeButton:
+ case Type_IconifyButton:
+ if (_pressed) {
+ if (_focused)
+ setTexture(_style->getButtonPressedFocus());
+ else
+ setTexture(_style->getButtonPressedUnfocus());
+ } else {
+ if (_focused)
+ setTexture(_style->getButtonFocus());
+ else
+ setTexture(_style->getButtonUnfocus());
+ }
+ break;
+ default:
+ assert(false); // there's no other button widgets!
+ }
+}
+
+