Codechange: Use Colours type instead of byte.

This commit is contained in:
2019-03-09 18:20:03 +00:00
committed by Charles Pigott
parent cc5f175615
commit 811bf22620
5 changed files with 8 additions and 8 deletions

View File

@@ -22,7 +22,7 @@
#include "../safeguards.h"
void DropDownListItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
void DropDownListItem::Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const
{
int c1 = _colour_gradient[bg_colour][3];
int c2 = _colour_gradient[bg_colour][7];
@@ -39,7 +39,7 @@ uint DropDownListStringItem::Width() const
return GetStringBoundingBox(buffer).width;
}
void DropDownListStringItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
void DropDownListStringItem::Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const
{
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, this->String(), sel ? TC_WHITE : TC_BLACK);
}

View File

@@ -32,7 +32,7 @@ public:
virtual bool Selectable() const { return false; }
virtual uint Height(uint width) const { return FONT_HEIGHT_NORMAL; }
virtual uint Width() const { return 0; }
virtual void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const;
virtual void Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const;
};
/**
@@ -47,7 +47,7 @@ public:
virtual bool Selectable() const { return true; }
virtual uint Width() const;
virtual void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const;
virtual void Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const;
virtual StringID String() const { return this->string; }
static int CDECL NatSortFunc(const DropDownListItem * const *first, const DropDownListItem * const *second);