|
@@ -89,30 +89,30 @@ static const Widget _graph_legend_widget
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 88, 99, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 100, 111, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 112, 123, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 124, 135, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 136, 147, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 148, 159, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 160, 171, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 172, 183, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 247, 184, 195, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _graph_legend_desc = {
|
|
|
static const WindowDesc _graph_legend_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 250, 198, 250, 198,
|
|
|
WC_GRAPH_LEGEND, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
|
|
_graph_legend_widgets,
|
|
|
};
|
|
|
_graph_legend_widgets
|
|
|
);
|
|
|
|
|
|
static void ShowGraphLegend()
|
|
|
{
|
|
|
AllocateWindowDescFront<GraphLegendWindow>(&_graph_legend_desc, 0);
|
|
|
}
|
|
|
|
|
|
/******************/
|
|
|
/* BASE OF GRAPHS */
|
|
|
/*****************/
|
|
|
|
|
|
struct BaseGraphWindow : Window {
|
|
|
protected:
|
|
@@ -430,30 +430,30 @@ struct OperatingProfitGraphWindow : Base
|
|
|
return c->old_economy[j].income + c->old_economy[j].expenses;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const Widget _operating_profit_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 525, 0, 13, STR_7025_OPERATING_PROFIT_GRAPH, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 575, 14, 173, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _operating_profit_desc = {
|
|
|
static const WindowDesc _operating_profit_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 576, 174, 576, 174,
|
|
|
WC_OPERATING_PROFIT, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
_operating_profit_widgets,
|
|
|
};
|
|
|
_operating_profit_widgets
|
|
|
);
|
|
|
|
|
|
|
|
|
void ShowOperatingProfitGraph()
|
|
|
{
|
|
|
AllocateWindowDescFront<OperatingProfitGraphWindow>(&_operating_profit_desc, 0);
|
|
|
}
|
|
|
|
|
|
|
|
|
/****************/
|
|
|
/* INCOME GRAPH */
|
|
|
/****************/
|
|
|
|
|
@@ -469,30 +469,30 @@ struct IncomeGraphWindow : BaseGraphWind
|
|
|
return c->old_economy[j].income;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const Widget _income_graph_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 525, 0, 13, STR_7022_INCOME_GRAPH, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 575, 14, 141, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _income_graph_desc = {
|
|
|
static const WindowDesc _income_graph_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 576, 142, 576, 142,
|
|
|
WC_INCOME_GRAPH, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
_income_graph_widgets,
|
|
|
};
|
|
|
_income_graph_widgets
|
|
|
);
|
|
|
|
|
|
void ShowIncomeGraph()
|
|
|
{
|
|
|
AllocateWindowDescFront<IncomeGraphWindow>(&_income_graph_desc, 0);
|
|
|
}
|
|
|
|
|
|
/*******************/
|
|
|
/* DELIVERED CARGO */
|
|
|
/*******************/
|
|
|
|
|
|
struct DeliveredCargoGraphWindow : BaseGraphWindow {
|
|
|
DeliveredCargoGraphWindow(const WindowDesc *desc, WindowNumber window_number) :
|
|
@@ -506,30 +506,30 @@ struct DeliveredCargoGraphWindow : BaseG
|
|
|
return c->old_economy[j].delivered_cargo;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const Widget _delivered_cargo_graph_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 525, 0, 13, STR_7050_UNITS_OF_CARGO_DELIVERED, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 575, 14, 141, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _delivered_cargo_graph_desc = {
|
|
|
static const WindowDesc _delivered_cargo_graph_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 576, 142, 576, 142,
|
|
|
WC_DELIVERED_CARGO, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
_delivered_cargo_graph_widgets,
|
|
|
};
|
|
|
_delivered_cargo_graph_widgets
|
|
|
);
|
|
|
|
|
|
void ShowDeliveredCargoGraph()
|
|
|
{
|
|
|
AllocateWindowDescFront<DeliveredCargoGraphWindow>(&_delivered_cargo_graph_desc, 0);
|
|
|
}
|
|
|
|
|
|
/***********************/
|
|
|
/* PERFORMANCE HISTORY */
|
|
|
/***********************/
|
|
|
|
|
|
struct PerformanceHistoryGraphWindow : BaseGraphWindow {
|
|
|
PerformanceHistoryGraphWindow(const WindowDesc *desc, WindowNumber window_number) :
|
|
@@ -550,30 +550,30 @@ struct PerformanceHistoryGraphWindow : B
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const Widget _performance_history_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 475, 0, 13, STR_7051_COMPANY_PERFORMANCE_RATINGS, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
|
|
|
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 476, 525, 0, 13, STR_PERFORMANCE_DETAIL_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 575, 14, 237, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _performance_history_desc = {
|
|
|
static const WindowDesc _performance_history_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 576, 238, 576, 238,
|
|
|
WC_PERFORMANCE_HISTORY, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
_performance_history_widgets,
|
|
|
};
|
|
|
_performance_history_widgets
|
|
|
);
|
|
|
|
|
|
void ShowPerformanceHistoryGraph()
|
|
|
{
|
|
|
AllocateWindowDescFront<PerformanceHistoryGraphWindow>(&_performance_history_desc, 0);
|
|
|
}
|
|
|
|
|
|
/*****************/
|
|
|
/* COMPANY VALUE */
|
|
|
/*****************/
|
|
|
|
|
|
struct CompanyValueGraphWindow : BaseGraphWindow {
|
|
|
CompanyValueGraphWindow(const WindowDesc *desc, WindowNumber window_number) :
|
|
@@ -587,30 +587,30 @@ struct CompanyValueGraphWindow : BaseGra
|
|
|
return c->old_economy[j].company_value;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const Widget _company_value_graph_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 525, 0, 13, STR_7052_COMPANY_VALUES, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 575, 14, 237, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _company_value_graph_desc = {
|
|
|
static const WindowDesc _company_value_graph_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 576, 238, 576, 238,
|
|
|
WC_COMPANY_VALUE, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
_company_value_graph_widgets,
|
|
|
};
|
|
|
_company_value_graph_widgets
|
|
|
);
|
|
|
|
|
|
void ShowCompanyValueGraph()
|
|
|
{
|
|
|
AllocateWindowDescFront<CompanyValueGraphWindow>(&_company_value_graph_desc, 0);
|
|
|
}
|
|
|
|
|
|
/*****************/
|
|
|
/* PAYMENT RATES */
|
|
|
/*****************/
|
|
|
|
|
|
struct PaymentRatesGraphWindow : BaseGraphWindow {
|
|
|
PaymentRatesGraphWindow(const WindowDesc *desc, WindowNumber window_number) :
|
|
@@ -711,30 +711,30 @@ struct PaymentRatesGraphWindow : BaseGra
|
|
|
this->SetDirty();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const Widget _cargo_payment_rates_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 567, 0, 13, STR_7061_CARGO_PAYMENT_RATES, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_PANEL, RESIZE_BOTTOM, COLOUR_GREY, 0, 567, 14, 45, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _cargo_payment_rates_desc = {
|
|
|
static const WindowDesc _cargo_payment_rates_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 568, 46, 568, 46,
|
|
|
WC_PAYMENT_RATES, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
|
|
_cargo_payment_rates_widgets,
|
|
|
};
|
|
|
_cargo_payment_rates_widgets
|
|
|
);
|
|
|
|
|
|
|
|
|
void ShowCargoPaymentRates()
|
|
|
{
|
|
|
AllocateWindowDescFront<PaymentRatesGraphWindow>(&_cargo_payment_rates_desc, 0);
|
|
|
}
|
|
|
|
|
|
/************************/
|
|
|
/* COMPANY LEAGUE TABLE */
|
|
|
/************************/
|
|
|
|
|
|
static const StringID _performance_titles[] = {
|
|
@@ -834,30 +834,30 @@ public:
|
|
|
}
|
|
|
};
|
|
|
|
|
|
|
|
|
static const Widget _company_league_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 387, 0, 13, STR_7053_COMPANY_LEAGUE_TABLE, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_STICKYBOX, RESIZE_NONE, COLOUR_GREY, 388, 399, 0, 13, STR_NULL, STR_STICKY_BUTTON},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 399, 14, 166, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _company_league_desc = {
|
|
|
static const WindowDesc _company_league_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 400, 167, 400, 167,
|
|
|
WC_COMPANY_LEAGUE, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
|
|
|
_company_league_widgets,
|
|
|
};
|
|
|
_company_league_widgets
|
|
|
);
|
|
|
|
|
|
void ShowCompanyLeagueTable()
|
|
|
{
|
|
|
AllocateWindowDescFront<CompanyLeagueWindow>(&_company_league_desc, 0);
|
|
|
}
|
|
|
|
|
|
/*****************************/
|
|
|
/* PERFORMANCE RATING DETAIL */
|
|
|
/*****************************/
|
|
|
|
|
|
struct PerformanceRatingDetailWindow : Window {
|
|
|
private:
|
|
@@ -1079,23 +1079,23 @@ static const Widget _performance_rating_
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 224, 260, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 261, 297, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 2, 38, 27, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 39, 75, 27, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 76, 112, 27, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 113, 149, 27, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 150, 186, 27, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 187, 223, 27, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 224, 260, 27, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _performance_rating_detail_desc = {
|
|
|
static const WindowDesc _performance_rating_detail_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 299, 241, 299, 241,
|
|
|
WC_PERFORMANCE_DETAIL, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
|
|
_performance_rating_detail_widgets,
|
|
|
};
|
|
|
_performance_rating_detail_widgets
|
|
|
);
|
|
|
|
|
|
void ShowPerformanceRatingDetail()
|
|
|
{
|
|
|
AllocateWindowDescFront<PerformanceRatingDetailWindow>(&_performance_rating_detail_desc, 0);
|
|
|
}
|