Changeset - r27082:fad11ce90187
[Not reviewed]
master
0 1 0
Peter Nelson - 14 months ago 2023-04-12 11:21:07
peter1138@openttd.org
Cleanup: Let GetStringBoundingBox deal with buffer.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/widgets/dropdown.cpp
Show inline comments
 
@@ -33,9 +33,7 @@ void DropDownListItem::Draw(const Rect &
 

	
 
uint DropDownListStringItem::Width() const
 
{
 
	char buffer[512];
 
	GetString(buffer, this->String(), lastof(buffer));
 
	return GetStringBoundingBox(buffer).width + WidgetDimensions::scaled.dropdowntext.Horizontal();
 
	return GetStringBoundingBox(this->String()).width + WidgetDimensions::scaled.dropdowntext.Horizontal();
 
}
 

	
 
void DropDownListStringItem::Draw(const Rect &r, bool sel, Colours bg_colour) const
0 comments (0 inline, 0 general)