Fix: Draw unavailable mask over picker sprite instead of behind it.
This makes these disabled picker buttons consistent with other disabled buttons.
This commit is contained in:

committed by
Peter Nelson

parent
712a4bb40b
commit
7466c3c39e
@@ -358,9 +358,6 @@ public:
|
||||
const ObjectSpec *spec = objclass->GetSpec(obj_index);
|
||||
if (spec == nullptr) break;
|
||||
|
||||
if (!spec->IsAvailable()) {
|
||||
GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), PC_BLACK, FILLRECT_CHECKER);
|
||||
}
|
||||
DrawPixelInfo tmp_dpi;
|
||||
/* Set up a clipping area for the preview. */
|
||||
Rect ir = r.Shrink(WidgetDimensions::scaled.bevel);
|
||||
@@ -375,6 +372,9 @@ public:
|
||||
std::min<int>(_selected_object_view, spec->views - 1));
|
||||
}
|
||||
}
|
||||
if (!spec->IsAvailable()) {
|
||||
GfxFillRect(ir, PC_BLACK, FILLRECT_CHECKER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user