subsidy_gui.c
author peter1138
Sun, 01 Oct 2006 12:00:32 +0000
changeset 4694 c917a3ad0dd2
parent 4634 07699ac2bf37
child 4938 0447845fd1b3
permissions -rw-r--r--
(svn r6601) - Codechange: Support cargo subtypes in the refit window. The refit window has been altered to support resizing and scrolling. Note that the cargo subtype isn't yet passed for actual refitting yet. (Based on mart3p's patch)
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2163
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2163
diff changeset
     2
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     3
#include "stdafx.h"
1891
862800791170 (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents: 1093
diff changeset
     4
#include "openttd.h"
507
04b5403aaf6b (svn r815) Include strings.h only in the files which need it.
tron
parents: 193
diff changeset
     5
#include "table/strings.h"
2163
b17b313113a0 (svn r2673) Include functions.h directly, not globally via openttd.h
tron
parents: 2159
diff changeset
     6
#include "functions.h"
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     7
#include "window.h"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
#include "station.h"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     9
#include "industry.h"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    10
#include "town.h"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    11
#include "player.h"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    12
#include "gfx.h"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    13
#include "economy.h"
2159
f6284cf5fab0 (svn r2669) Shuffle some more stuff around to reduce dependencies
tron
parents: 1962
diff changeset
    14
#include "variables.h"
4261
28670f743746 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
rubidium
parents: 4171
diff changeset
    15
#include "date.h"
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    16
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    17
static void HandleSubsidyClick(int y)
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 176
diff changeset
    18
{
4171
5c6e60c392c3 (svn r5609) CodeChange : Apply coding style
belugas
parents: 2857
diff changeset
    19
	const Subsidy *s;
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    20
	uint num;
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    21
	int offs;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    22
	TileIndex xy;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    23
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    24
	if (y < 0) return;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    25
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    26
	num = 0;
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    27
	for (s = _subsidies; s != endof(_subsidies); s++) {
2469
59a0073914d8 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
tron
parents: 2186
diff changeset
    28
		if (s->cargo_type != CT_INVALID && s->age < 12) {
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    29
			y -= 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    30
			if (y < 0) goto handle_click;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    31
			num++;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    32
		}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    33
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    34
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    35
	if (num == 0) {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    36
		y -= 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    37
		if (y < 0) return;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    38
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    39
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    40
	y -= 11;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    41
	if (y < 0) return;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    42
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    43
	for (s = _subsidies; s != endof(_subsidies); s++) {
2469
59a0073914d8 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
tron
parents: 2186
diff changeset
    44
		if (s->cargo_type != CT_INVALID && s->age >= 12) {
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    45
			y -= 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    46
			if (y < 0) goto handle_click;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    47
		}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    48
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    49
	return;
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 176
diff changeset
    50
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    51
handle_click:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    52
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    53
	/* determine from coordinate for subsidy and try to scroll to it */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    54
	offs = s->from;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    55
	if (s->age >= 12) {
919
544f374ee392 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
truelight
parents: 867
diff changeset
    56
		xy = GetStation(offs)->xy;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    57
	} else if (s->cargo_type == CT_PASSENGERS || s->cargo_type == CT_MAIL) {
919
544f374ee392 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
truelight
parents: 867
diff changeset
    58
		xy = GetTown(offs)->xy;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    59
	} else {
919
544f374ee392 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
truelight
parents: 867
diff changeset
    60
		xy = GetIndustry(offs)->xy;
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 176
diff changeset
    61
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    62
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    63
	if (!ScrollMainWindowToTile(xy)) {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    64
		/* otherwise determine to coordinate for subsidy and scroll to it */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    65
		offs = s->to;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    66
		if (s->age >= 12) {
919
544f374ee392 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
truelight
parents: 867
diff changeset
    67
			xy = GetStation(offs)->xy;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    68
		} else if (s->cargo_type == CT_PASSENGERS || s->cargo_type == CT_MAIL || s->cargo_type == CT_GOODS || s->cargo_type == CT_FOOD) {
919
544f374ee392 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
truelight
parents: 867
diff changeset
    69
			xy = GetTown(offs)->xy;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    70
		} else {
919
544f374ee392 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
truelight
parents: 867
diff changeset
    71
			xy = GetIndustry(offs)->xy;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    72
		}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    73
		ScrollMainWindowToTile(xy);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    74
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    75
}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    76
4171
5c6e60c392c3 (svn r5609) CodeChange : Apply coding style
belugas
parents: 2857
diff changeset
    77
static void DrawSubsidiesWindow(const Window *w)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    78
{
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    79
	YearMonthDay ymd;
4171
5c6e60c392c3 (svn r5609) CodeChange : Apply coding style
belugas
parents: 2857
diff changeset
    80
	const Subsidy *s;
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    81
	uint num;
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    82
	int x;
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    83
	int y;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    84
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    85
	DrawWindowWidgets(w);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    86
4288
393de75451b1 (svn r5918) -Cleanup: rename ConvertDayToYMD/ConvertYMDToDay as they really convert a Date to/from a YearMonthDay.
rubidium
parents: 4261
diff changeset
    87
	ConvertDateToYMD(_date, &ymd);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    88
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    89
	y = 15;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    90
	x = 1;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    91
	DrawString(x, y, STR_2026_SUBSIDIES_ON_OFFER_FOR, 0);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    92
	y += 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    93
	num = 0;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    94
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    95
	for (s = _subsidies; s != endof(_subsidies); s++) {
2469
59a0073914d8 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
tron
parents: 2186
diff changeset
    96
		if (s->cargo_type != CT_INVALID && s->age < 12) {
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    97
			int x2;
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
    98
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    99
			SetupSubsidyDecodeParam(s, 1);
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   100
			x2 = DrawString(x + 2, y, STR_2027_FROM_TO, 0);
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 176
diff changeset
   101
534
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 507
diff changeset
   102
			SetDParam(0, _date - ymd.day + 384 - s->age * 32);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   103
			DrawString(x2, y, STR_2028_BY, 0);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   104
			y += 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   105
			num++;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   106
		}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   107
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   108
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   109
	if (num == 0) {
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   110
		DrawString(x + 2, y, STR_202A_NONE, 0);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   111
		y += 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   112
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   113
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   114
	DrawString(x, y + 1, STR_202B_SERVICES_ALREADY_SUBSIDISED, 0);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   115
	y += 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   116
	num = 0;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   117
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   118
	for (s = _subsidies; s != endof(_subsidies); s++) {
2469
59a0073914d8 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
tron
parents: 2186
diff changeset
   119
		if (s->cargo_type != CT_INVALID && s->age >= 12) {
4171
5c6e60c392c3 (svn r5609) CodeChange : Apply coding style
belugas
parents: 2857
diff changeset
   120
			const Player *p;
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   121
			int xt;
2630
7206058a7e82 (svn r3172) static, const
tron
parents: 2469
diff changeset
   122
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   123
			SetupSubsidyDecodeParam(s, 1);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   124
1962
8254df1b359b (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
celestar
parents: 1891
diff changeset
   125
			p = GetPlayer(GetStation(s->to)->owner);
534
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 507
diff changeset
   126
			SetDParam(3, p->name_1);
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 507
diff changeset
   127
			SetDParam(4, p->name_2);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   128
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   129
			xt = DrawString(x + 2, y, STR_202C_FROM_TO, 0);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   130
534
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 507
diff changeset
   131
			SetDParam(0, _date - ymd.day + 768 - s->age * 32);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   132
			DrawString(xt, y, STR_202D_UNTIL, 0);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   133
			y += 10;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   134
			num++;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   135
		}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   136
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   137
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   138
	if (num == 0) DrawString(x + 2, y, STR_202A_NONE, 0);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   139
}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   140
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   141
static void SubsidiesListWndProc(Window *w, WindowEvent *e)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   142
{
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   143
	switch (e->event) {
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   144
		case WE_PAINT: DrawSubsidiesWindow(w); break;
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   145
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   146
		case WE_CLICK:
4634
07699ac2bf37 (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
belugas
parents: 4288
diff changeset
   147
			switch (e->we.click.widget) {
07699ac2bf37 (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
belugas
parents: 4288
diff changeset
   148
				case 3:
07699ac2bf37 (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
belugas
parents: 4288
diff changeset
   149
					HandleSubsidyClick(e->we.click.pt.y - 25);
07699ac2bf37 (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
belugas
parents: 4288
diff changeset
   150
					break;
2639
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   151
			}
eeaefdabfdfd (svn r3181) -Bracing
tron
parents: 2630
diff changeset
   152
		break;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   153
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   154
}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   155
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   156
static const Widget _subsidies_list_widgets[] = {
2857
33c1f9df1635 (svn r3405) - Feature: Make subsidies window pinnable. Don't ask me why this wasn't included in the first round of pinning.
Darkvater
parents: 2791
diff changeset
   157
{   WWT_CLOSEBOX,   RESIZE_NONE, 13,   0,  10,   0,  13, STR_00C5,           STR_018B_CLOSE_WINDOW},
33c1f9df1635 (svn r3405) - Feature: Make subsidies window pinnable. Don't ask me why this wasn't included in the first round of pinning.
Darkvater
parents: 2791
diff changeset
   158
{    WWT_CAPTION,   RESIZE_NONE, 13,  11, 617,   0,  13, STR_2025_SUBSIDIES, STR_018C_WINDOW_TITLE_DRAG_THIS},
33c1f9df1635 (svn r3405) - Feature: Make subsidies window pinnable. Don't ask me why this wasn't included in the first round of pinning.
Darkvater
parents: 2791
diff changeset
   159
{  WWT_STICKYBOX,   RESIZE_NONE, 13, 618, 629,   0,  13, STR_NULL,           STR_STICKY_BUTTON},
33c1f9df1635 (svn r3405) - Feature: Make subsidies window pinnable. Don't ask me why this wasn't included in the first round of pinning.
Darkvater
parents: 2791
diff changeset
   160
{      WWT_PANEL,   RESIZE_NONE, 13,   0, 629,  14, 126, STR_NULL,           STR_01FD_CLICK_ON_SERVICE_TO_CENTER},
176
84990c4b9212 (svn r177) -Fix: padded out Widget code to solve warnings on C99 compiler (Tron)
darkvater
parents: 0
diff changeset
   161
{   WIDGETS_END},
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   162
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   163
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   164
static const WindowDesc _subsidies_list_desc = {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   165
	-1, -1, 630, 127,
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   166
	WC_SUBSIDIES_LIST,0,
2857
33c1f9df1635 (svn r3405) - Feature: Make subsidies window pinnable. Don't ask me why this wasn't included in the first round of pinning.
Darkvater
parents: 2791
diff changeset
   167
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   168
	_subsidies_list_widgets,
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   169
	SubsidiesListWndProc
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   170
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   171
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   172
1093
4fdc46eaf423 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents: 919
diff changeset
   173
void ShowSubsidiesList(void)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   174
{
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   175
	AllocateWindowDescFront(&_subsidies_list_desc, 0);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   176
}