Codechange: Remove direct access to _colour_gradient.
Access is now through GetColourGradient, which ensures parameters are in range.
This commit is contained in:

committed by
Peter Nelson

parent
56cf89d189
commit
0463d4c198
@@ -794,7 +794,7 @@ void QueryString::DrawEditBox(const Window *w, WidgetID wid) const
|
||||
|
||||
DrawFrameRect(cr, wi->colour, wi->IsLowered() ? FR_LOWERED : FR_NONE);
|
||||
DrawSpriteIgnorePadding(rtl ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT, PAL_NONE, cr, SA_CENTER);
|
||||
if (this->text.bytes == 1) GfxFillRect(cr.Shrink(WidgetDimensions::scaled.bevel), _colour_gradient[wi->colour & 0xF][2], FILLRECT_CHECKER);
|
||||
if (this->text.bytes == 1) GfxFillRect(cr.Shrink(WidgetDimensions::scaled.bevel), GetColourGradient(wi->colour, 2), FILLRECT_CHECKER);
|
||||
|
||||
DrawFrameRect(fr, wi->colour, FR_LOWERED | FR_DARKENED);
|
||||
GfxFillRect(fr.Shrink(WidgetDimensions::scaled.bevel), PC_BLACK);
|
||||
|
Reference in New Issue
Block a user