summaryrefslogtreecommitdiff
path: root/src/widgets/dropdown.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-04-10 14:56:14 +0000
committerfrosch <frosch@openttd.org>2011-04-10 14:56:14 +0000
commit18f0add50ad1066345ffe79f5e5e0e998b40c40d (patch)
treeecfe6d39ec10b406ca1f0a96e02872f121754648 /src/widgets/dropdown.cpp
parent5bf90860f8af2c648c2704f29e1c9ac28deddd55 (diff)
downloadopenttd-18f0add50ad1066345ffe79f5e5e0e998b40c40d.tar.xz
(svn r22310) -Codechange: Derive DropDownListCharStringItem from DropDownListStringItem.
Diffstat (limited to 'src/widgets/dropdown.cpp')
-rw-r--r--src/widgets/dropdown.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 67dca1cd4..1d5878aa5 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -44,14 +44,10 @@ StringID DropDownListParamStringItem::String() const
return this->string;
}
-uint DropDownListCharStringItem::Width() const
+StringID DropDownListCharStringItem::String() const
{
- return GetStringBoundingBox(this->string).width;
-}
-
-void DropDownListCharStringItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
-{
- DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, this->string, sel ? TC_WHITE : TC_BLACK);
+ SetDParamStr(0, this->raw_string);
+ return this->string;
}
/**