diff options
author | tron <tron@openttd.org> | 2005-08-03 13:07:29 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-08-03 13:07:29 +0000 |
commit | e4cad82b003de14753489d8211620b3b1c19fd71 (patch) | |
tree | c49b36a2b66e435ce4b8d0018d6adeeb25406336 /misc_gui.c | |
parent | 1d527c58cb7036d6d12b1c23046723248ce9ce47 (diff) | |
download | openttd-e4cad82b003de14753489d8211620b3b1c19fd71.tar.xz |
(svn r2799) Make the only two non-const widget lists const
Diffstat (limited to 'misc_gui.c')
-rw-r--r-- | misc_gui.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/misc_gui.c b/misc_gui.c index b5ae37ffd..7fdfba679 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -615,7 +615,7 @@ void ShowFeederIncomeAnimation(int x, int y, int z, int32 cost) AddTextEffect(STR_FEEDER, pt.x, pt.y, 0x250); } -static Widget _tooltips_widgets[] = { +static const Widget _tooltips_widgets[] = { { WWT_PANEL, RESIZE_NONE, 14, 0, 199, 0, 31, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -665,9 +665,6 @@ void GuiShowTooltips(StringID string_id) right = 200; } - _tooltips_widgets[0].right = right; - _tooltips_widgets[0].bottom = bottom; - y = _cursor.pos.y + 30; if (y < 22) y = 22; @@ -681,6 +678,8 @@ void GuiShowTooltips(StringID string_id) w = AllocateWindow(x, y, right, bottom, TooltipsWndProc, WC_TOOLTIPS, _tooltips_widgets); WP(w,tooltips_d).string_id = string_id; w->flags4 &= ~WF_WHITE_BORDER_MASK; + w->widget[0].right = right; + w->widget[0].bottom = bottom; } |