Changeset - r8358:1dc4fbe86887
[Not reviewed]
master
0 1 0
peter1138 - 17 years ago 2008-01-19 11:08:06
peter1138@openttd.org
(svn r11924) -Codechange: All dropdowns now use the dropdown widget, so compatibility code can be removed
1 file changed with 3 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/widgets/dropdown.cpp
Show inline comments
 
@@ -246,21 +246,17 @@ void ShowDropDownList(Window *w, DropDow
 
		}
 
	}
 

	
 
	/* XXX Temporary fix to make dropdown compatible with separate widgets */
 
	const Widget *wil = wi;
 
	if (wi->type != WWT_DROPDOWN && wi->type != WWT_DROPDOWNIN) wil--;
 

	
 
	Window *dw = AllocateWindow(
 
		w->left + wil->left,
 
		w->left + wi->left,
 
		top,
 
		wi->right - wil->left + 1,
 
		wi->right - wi->left + 1,
 
		height,
 
		DropDownMenuWndProc,
 
		WC_DROPDOWN_MENU,
 
		_dropdown_menu_widgets);
 

	
 
	dw->widget[0].color = wi->color;
 
	dw->widget[0].right = wi->right - wil->left;
 
	dw->widget[0].right = wi->right - wi->left;
 
	dw->widget[0].bottom = height - 1;
 

	
 
	dw->SetWidgetHiddenState(1, !scroll);
0 comments (0 inline, 0 general)