src/widget.cpp
changeset 8424 4a488a90ccab
parent 8320 6ffad7a5d242
child 8458 e3b1575895cd
--- a/src/widget.cpp	Mon Nov 19 20:40:14 2007 +0000
+++ b/src/widget.cpp	Mon Nov 19 21:02:30 2007 +0000
@@ -496,12 +496,12 @@
 		return - 1;
 
 	item = y / 10;
-	if (item >= WP(w,dropdown_d).num_items || (HASBIT(WP(w,dropdown_d).disabled_state, item) && !HASBIT(WP(w,dropdown_d).hidden_state, item)) || WP(w,dropdown_d).items[item] == 0)
+	if (item >= WP(w,dropdown_d).num_items || (HasBit(WP(w,dropdown_d).disabled_state, item) && !HasBit(WP(w,dropdown_d).hidden_state, item)) || WP(w,dropdown_d).items[item] == 0)
 		return - 1;
 
 	/* Skip hidden items -- +1 for each hidden item before the clicked item. */
 	for (counter = 0; item >= counter; ++counter)
-		if (HASBIT(WP(w,dropdown_d).hidden_state, counter)) item++;
+		if (HasBit(WP(w,dropdown_d).hidden_state, counter)) item++;
 
 	return item;
 }
@@ -525,14 +525,14 @@
 			height = w->widget[0].bottom - 3;
 
 			for (i = 0; WP(w,dropdown_d).items[i] != INVALID_STRING_ID; i++, sel--) {
-				if (HASBIT(WP(w,dropdown_d).hidden_state, i)) continue;
+				if (HasBit(WP(w,dropdown_d).hidden_state, i)) continue;
 
 				if (y >= 0 && y <= height) {
 					if (WP(w,dropdown_d).items[i] != STR_NULL) {
 						if (sel == 0) GfxFillRect(x + 1, y, x + width, y + 9, 0);
 						DrawStringTruncated(x + 2, y, WP(w,dropdown_d).items[i], sel == 0 ? TC_WHITE : TC_BLACK, x + width);
 
-						if (HASBIT(WP(w,dropdown_d).disabled_state, i)) {
+						if (HasBit(WP(w,dropdown_d).disabled_state, i)) {
 							GfxFillRect(x, y, x + width, y + 9,
 								(1 << PALETTE_MODIFIER_GREYOUT) | _colour_gradient[_dropdown_menu_widgets[0].color][5]
 							);
@@ -630,7 +630,7 @@
 		uint j;
 
 		for (j = 0; strings[j] != INVALID_STRING_ID; j++) {
-			if (HASBIT(hidden_mask, j)) i--;
+			if (HasBit(hidden_mask, j)) i--;
 		}
 	}