changeset 2275 | 11a1dac70c45 |
parent 2261 | d3554e5d3e86 |
child 2310 | 95d4a45a0ad4 |
2274:2c99425c1086 | 2275:11a1dac70c45 |
---|---|
613 |
613 |
614 SetDParam(0, cost); |
614 SetDParam(0, cost); |
615 AddTextEffect(STR_FEEDER, pt.x, pt.y, 0x250); |
615 AddTextEffect(STR_FEEDER, pt.x, pt.y, 0x250); |
616 } |
616 } |
617 |
617 |
618 static Widget _tooltips_widgets[] = { |
618 static const Widget _tooltips_widgets[] = { |
619 { WWT_PANEL, RESIZE_NONE, 14, 0, 199, 0, 31, 0x0, STR_NULL}, |
619 { WWT_PANEL, RESIZE_NONE, 14, 0, 199, 0, 31, 0x0, STR_NULL}, |
620 { WIDGETS_END}, |
620 { WIDGETS_END}, |
621 }; |
621 }; |
622 |
622 |
623 |
623 |
663 if (right > 200) { |
663 if (right > 200) { |
664 bottom += ((right - 4) / 176) * 10; |
664 bottom += ((right - 4) / 176) * 10; |
665 right = 200; |
665 right = 200; |
666 } |
666 } |
667 |
667 |
668 _tooltips_widgets[0].right = right; |
|
669 _tooltips_widgets[0].bottom = bottom; |
|
670 |
|
671 y = _cursor.pos.y + 30; |
668 y = _cursor.pos.y + 30; |
672 if (y < 22) y = 22; |
669 if (y < 22) y = 22; |
673 |
670 |
674 if (y > (_screen.height - 44) && (y-=52) > (_screen.height - 44)) |
671 if (y > (_screen.height - 44) && (y-=52) > (_screen.height - 44)) |
675 y = (_screen.height - 44); |
672 y = (_screen.height - 44); |
679 if (x > (_screen.width - right)) x = _screen.width - right; |
676 if (x > (_screen.width - right)) x = _screen.width - right; |
680 |
677 |
681 w = AllocateWindow(x, y, right, bottom, TooltipsWndProc, WC_TOOLTIPS, _tooltips_widgets); |
678 w = AllocateWindow(x, y, right, bottom, TooltipsWndProc, WC_TOOLTIPS, _tooltips_widgets); |
682 WP(w,tooltips_d).string_id = string_id; |
679 WP(w,tooltips_d).string_id = string_id; |
683 w->flags4 &= ~WF_WHITE_BORDER_MASK; |
680 w->flags4 &= ~WF_WHITE_BORDER_MASK; |
681 w->widget[0].right = right; |
|
682 w->widget[0].bottom = bottom; |
|
684 } |
683 } |
685 |
684 |
686 |
685 |
687 static void DrawStationCoverageText(const AcceptedCargo accepts, |
686 static void DrawStationCoverageText(const AcceptedCargo accepts, |
688 int str_x, int str_y, uint mask) |
687 int str_x, int str_y, uint mask) |