summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-03-09 18:20:03 +0000
committerCharles Pigott <charlespigott@googlemail.com>2019-03-10 09:20:11 +0000
commit811bf2262019b855c9005793e5efc725ac77a7b3 (patch)
tree51e37f4cafa186c4a05331fa45fb7515497467d0 /src/widgets
parentcc5f17561571b45b52e7406fb66051446f8cceb4 (diff)
downloadopenttd-811bf2262019b855c9005793e5efc725ac77a7b3.tar.xz
Codechange: Use Colours type instead of byte.
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp4
-rw-r--r--src/widgets/dropdown_type.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 61656c020..fb235a6eb 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -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);
}
diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h
index b65d4557b..bc225dadf 100644
--- a/src/widgets/dropdown_type.h
+++ b/src/widgets/dropdown_type.h
@@ -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);