summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-19 21:02:30 +0000
committerskidd13 <skidd13@openttd.org>2007-11-19 21:02:30 +0000
commit71c4325c50ae594a5adf01cac7c9e527b239cdcb (patch)
tree21212e0b25777aac62f30d88b981e2bd624c4616 /src/widget.cpp
parent58bb5c752568f8f9a1cb4d9533268d0ecad34e12 (diff)
downloadopenttd-71c4325c50ae594a5adf01cac7c9e527b239cdcb.tar.xz
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 0fe09ac1a..6e9c73b7f 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -496,12 +496,12 @@ static int GetDropdownItem(const Window *w)
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 @@ static void DropdownMenuWndProc(Window *w, WindowEvent *e)
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 @@ void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int butt
uint j;
for (j = 0; strings[j] != INVALID_STRING_ID; j++) {
- if (HASBIT(hidden_mask, j)) i--;
+ if (HasBit(hidden_mask, j)) i--;
}
}