|
@@ -307,25 +307,25 @@ struct CompanyFinancesWindow : Window {
|
|
|
DoCommandP(0, 0, _ctrl_pressed, CMD_DECREASE_LOAN | CMD_MSG(STR_702F_CAN_T_REPAY_LOAN));
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _company_finances_desc = {
|
|
|
static const WindowDesc _company_finances_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 407, 60 + 10, 407, 60 + 10,
|
|
|
WC_FINANCES, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
|
|
|
_company_finances_widgets,
|
|
|
};
|
|
|
_company_finances_widgets
|
|
|
);
|
|
|
|
|
|
static const WindowDesc _company_finances_small_desc = {
|
|
|
static const WindowDesc _company_finances_small_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 280, 60, 280, 60,
|
|
|
WC_FINANCES, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
|
|
|
_company_finances_small_widgets,
|
|
|
};
|
|
|
_company_finances_small_widgets
|
|
|
);
|
|
|
|
|
|
/**
|
|
|
* Open the small/large finance window of the company
|
|
|
*
|
|
|
* @param company the company who's finances are requested to be seen
|
|
|
* @param show_small show large or small version opf the window
|
|
@@ -623,18 +623,18 @@ static const Widget _select_company_live
|
|
|
{ WWT_DROPDOWN, RESIZE_NONE, COLOUR_GREY, 150, 274, 36, 47, STR_02BD, STR_LIVERY_PRIMARY_TIP },
|
|
|
{ WWT_DROPDOWN, RESIZE_NONE, COLOUR_GREY, 275, 399, 36, 47, STR_02E1, STR_LIVERY_SECONDARY_TIP },
|
|
|
{ WWT_MATRIX, RESIZE_NONE, COLOUR_GREY, 0, 399, 48, 48 + 1 * 14, (1 << 8) | 1, STR_LIVERY_PANEL_TIP },
|
|
|
{ WIDGETS_END },
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _select_company_livery_desc = {
|
|
|
static const WindowDesc _select_company_livery_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 400, 49 + 1 * 14, 400, 49 + 1 * 14,
|
|
|
WC_COMPANY_COLOUR, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
|
|
_select_company_livery_widgets,
|
|
|
};
|
|
|
_select_company_livery_widgets
|
|
|
);
|
|
|
|
|
|
/**
|
|
|
* Draws the face of a company manager's face.
|
|
|
* @param cmf the company manager's face
|
|
|
* @param colour the (background) colour of the gradient
|
|
|
* @param x x-position to draw the face
|
|
@@ -1090,26 +1090,26 @@ public:
|
|
|
ShowErrorMessage(INVALID_STRING_ID, STR_FACE_FACECODE_ERR, 0, 0);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
/** normal/simple company manager face selection window description */
|
|
|
static const WindowDesc _select_company_manager_face_desc = {
|
|
|
static const WindowDesc _select_company_manager_face_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 190, 163, 190, 163,
|
|
|
WC_COMPANY_MANAGER_FACE, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
|
|
|
_select_company_manager_face_widgets,
|
|
|
};
|
|
|
_select_company_manager_face_widgets
|
|
|
);
|
|
|
|
|
|
/** advanced company manager face selection window description */
|
|
|
static const WindowDesc _select_company_manager_face_adv_desc = {
|
|
|
static const WindowDesc _select_company_manager_face_adv_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 220, 220, 220, 220,
|
|
|
WC_COMPANY_MANAGER_FACE, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
|
|
|
_select_company_manager_face_adv_widgets,
|
|
|
};
|
|
|
_select_company_manager_face_adv_widgets
|
|
|
);
|
|
|
|
|
|
/**
|
|
|
* Open the simple/advanced company manager face selection window
|
|
|
*
|
|
|
* @param parent the parent company window
|
|
|
* @param adv simple or advanced face selection window
|
|
@@ -1453,18 +1453,18 @@ struct CompanyWindow : Window
|
|
|
break;
|
|
|
#endif /* ENABLE_NETWORK */
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _company_desc = {
|
|
|
static const WindowDesc _company_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 360, 170, 360, 170,
|
|
|
WC_COMPANY, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
_company_widgets,
|
|
|
};
|
|
|
_company_widgets
|
|
|
);
|
|
|
|
|
|
void ShowCompany(CompanyID company)
|
|
|
{
|
|
|
if (!IsValidCompanyID(company)) return;
|
|
|
|
|
|
AllocateWindowDescFront<CompanyWindow>(&_company_desc, company);
|
|
@@ -1512,18 +1512,18 @@ static const Widget _buy_company_widgets
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_LIGHT_BLUE, 0, 333, 14, 136, 0x0, STR_NULL},
|
|
|
{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_LIGHT_BLUE, 148, 207, 117, 128, STR_00C9_NO, STR_NULL},
|
|
|
{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_LIGHT_BLUE, 218, 277, 117, 128, STR_00C8_YES, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _buy_company_desc = {
|
|
|
static const WindowDesc _buy_company_desc(
|
|
|
153, 171, 334, 137, 334, 137,
|
|
|
WC_BUY_COMPANY, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
|
|
|
_buy_company_widgets,
|
|
|
};
|
|
|
_buy_company_widgets
|
|
|
);
|
|
|
|
|
|
|
|
|
void ShowBuyCompanyDialog(CompanyID company)
|
|
|
{
|
|
|
AllocateWindowDescFront<BuyCompanyWindow>(&_buy_company_desc, company);
|
|
|
}
|