Changeset - r4573:34936d2fa6cc
[Not reviewed]
master
0 1 0
belugas - 18 years ago 2006-09-08 03:59:38
belugas@openttd.org
(svn r6423) -Codechange: Replace two magic numbers by appropriate enum/define value
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
widget.c
Show inline comments
 
@@ -519,13 +519,13 @@ static void DropdownMenuWndProc(Window *
 

	
 
			for (i = 0; WP(w,dropdown_d).items[i] != INVALID_STRING_ID; i++) {
 
				if (HASBIT(WP(w,dropdown_d).hidden_state, i)) {
 
					sel--;
 
					continue;
 
				}
 
				if (WP(w,dropdown_d).items[i] != 0) {
 
				if (WP(w,dropdown_d).items[i] != STR_NULL) {
 
					if (sel == 0) GfxFillRect(x + 1, y, x + w->width - 4, y + 9, 0);
 
					DrawStringTruncated(x + 2, y, WP(w,dropdown_d).items[i], sel == 0 ? 12 : 16, w->width - 4);
 

	
 
					if (HASBIT(WP(w,dropdown_d).disabled_state, i)) {
 
						GfxFillRect(x, y, x + w->width - 3, y + 9,
 
							PALETTE_MODIFIER_GREYOUT | _colour_gradient[_dropdown_menu_widgets[0].color][5]
 
@@ -631,13 +631,13 @@ void ShowDropDownMenu(Window *w, const S
 
	w2 = AllocateWindow(
 
		w->left + wi[-1].left + 1,
 
		w->top + wi->bottom + 2,
 
		wi->right - wi[-1].left + 1,
 
		i * 10 + 4,
 
		DropdownMenuWndProc,
 
		0x3F,
 
		WC_DROPDOWN_MENU,
 
		_dropdown_menu_widgets);
 

	
 
	w2->widget[0].color = wi->color;
 
	w2->widget[0].right = wi->right - wi[-1].left;
 
	w2->widget[0].bottom = i * 10 + 3;
 

	
0 comments (0 inline, 0 general)