summaryrefslogtreecommitdiff
path: root/widget.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-07-28 09:17:32 +0000
committercelestar <celestar@openttd.org>2005-07-28 09:17:32 +0000
commit04f4d8237b879e3bb7c61a84cfbb5146cd408111 (patch)
treee279dbeda45e111fee0148b401cba8615f3adaec /widget.c
parent139f0c95ca77b7c28510e92c3230495f88806cd9 (diff)
downloadopenttd-04f4d8237b879e3bb7c61a84cfbb5146cd408111.tar.xz
(svn r2736) -Codechange: De-mystified GfxDrawFillRect a bit, and used enums from table/sprites.h. You can now change the number of bits used for sprites and switches in the SpriteSetup enum and the rest should work automagically. Can be used to increase the number of active sprites to 2^19 in case there are no colortables (recolor sprites) in any newgrf. We should possibly move the the colortables to an own list, but how to detect them in a newgrf.
Diffstat (limited to 'widget.c')
-rw-r--r--widget.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/widget.c b/widget.c
index 12ac2f32e..5465ce852 100644
--- a/widget.c
+++ b/widget.c
@@ -285,7 +285,7 @@ void DrawWindowWidgets(Window *w)
// draw "shaded" background
GfxFillRect(r.left, r.top+10, r.right, r.bottom-10, c2);
- GfxFillRect(r.left, r.top+10, r.right, r.bottom-10, c1 | 0x8000);
+ GfxFillRect(r.left, r.top+10, r.right, r.bottom-10, c1 | PALETTE_MODIFIER_GREYOUT);
// draw shaded lines
GfxFillRect(r.left+2, r.top+10, r.left+2, r.bottom-10, c1);
@@ -317,7 +317,7 @@ void DrawWindowWidgets(Window *w)
// draw "shaded" background
GfxFillRect(r.left, r.top+10, r.right, r.bottom-10, c2);
- GfxFillRect(r.left, r.top+10, r.right, r.bottom-10, c1 | 0x8000);
+ GfxFillRect(r.left, r.top+10, r.right, r.bottom-10, c1 | PALETTE_MODIFIER_GREYOUT);
// draw shaded lines
GfxFillRect(r.left+2, r.top+10, r.left+2, r.bottom-10, c1);
@@ -350,7 +350,7 @@ void DrawWindowWidgets(Window *w)
// draw "shaded" background
GfxFillRect(r.left+10, r.top, r.right-10, r.bottom, c2);
- GfxFillRect(r.left+10, r.top, r.right-10, r.bottom, c1 | 0x8000);
+ GfxFillRect(r.left+10, r.top, r.right-10, r.bottom, c1 | PALETTE_MODIFIER_GREYOUT);
// draw shaded lines
GfxFillRect(r.left+10, r.top+2, r.right-10, r.top+2, c1);
@@ -426,7 +426,7 @@ void DrawWindowWidgets(Window *w)
DrawStringCentered( (r.left+r.right+1)>>1, r.top+2, wi->unkA, 0x84);
draw_default:;
if (cur_disabled & 1) {
- GfxFillRect(r.left+1, r.top+1, r.right-1, r.bottom-1, _color_list[wi->color&0xF].unk2 | 0x8000);
+ GfxFillRect(r.left+1, r.top+1, r.right-1, r.bottom-1, _color_list[wi->color&0xF].unk2 | PALETTE_MODIFIER_GREYOUT);
}
}
}
@@ -503,7 +503,7 @@ static void DropdownMenuWndProc(Window *w, WindowEvent *e)
DrawString(x+2, y, _dropdown_items[i], sel==0 ? 12 : 16);
if (HASBIT(_dropdown_disabled, i) && !_dropdown_disabled_items) {
- GfxFillRect(x, y, x+w->width-3, y + 9, 0x8000 +
+ GfxFillRect(x, y, x+w->width-3, y + 9, PALETTE_MODIFIER_GREYOUT |
_color_list[_dropdown_menu_widgets[0].color].window_color_bga);
}
} else {