|
@@ -119,25 +119,25 @@ static const NWidgetPart _nested_build_i
|
|
|
EndContainer(),
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
NWidget(WWT_TEXTBTN, COLOUR_DARK_GREEN, DPIW_FUND_WIDGET), SetResize(1, 0), SetDataTip(STR_JUST_STRING, STR_NULL),
|
|
|
NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN, DPIW_RESIZE_WIDGET),
|
|
|
EndContainer(),
|
|
|
};
|
|
|
|
|
|
/** Window definition of the dynamic place industries gui */
|
|
|
static const WindowDesc _build_industry_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 170, 212, 170, 212,
|
|
|
WC_BUILD_INDUSTRY, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION,
|
|
|
NULL, _nested_build_industry_widgets, lengthof(_nested_build_industry_widgets)
|
|
|
_nested_build_industry_widgets, lengthof(_nested_build_industry_widgets)
|
|
|
);
|
|
|
|
|
|
/** Build (fund or prospect) a new industry, */
|
|
|
class BuildIndustryWindow : public Window {
|
|
|
int selected_index; ///< index of the element in the matrix
|
|
|
IndustryType selected_type; ///< industry corresponding to the above index
|
|
|
uint16 callback_timer; ///< timer counter for callback eventual verification
|
|
|
bool timer_enabled; ///< timer can be used
|
|
|
uint16 count; ///< How many industries are loaded
|
|
|
IndustryType index[NUM_INDUSTRYTYPES + 1]; ///< Type of industry, in the order it was loaded
|
|
|
bool enabled[NUM_INDUSTRYTYPES + 1]; ///< availability state, coming from CBID_INDUSTRY_AVAILABLE (if ever)
|
|
|
|
|
@@ -814,25 +814,25 @@ static const NWidgetPart _nested_industr
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
NWidget(WWT_PUSHTXTBTN, COLOUR_CREAM, IVW_GOTO), SetMinimalSize(130, 12), SetDataTip(STR_BUTTON_LOCATION, STR_INDUSTRY_VIEW_LOCATION_TOOLTIP),
|
|
|
NWidget(WWT_PANEL, COLOUR_CREAM, IVW_SPACER), /*SetMinimalSize(118, 12),*/ SetResize(1, 0), EndContainer(),
|
|
|
NWidget(WWT_RESIZEBOX, COLOUR_CREAM, IVW_RESIZE),
|
|
|
EndContainer(),
|
|
|
};
|
|
|
|
|
|
/** Window definition of the view industy gui */
|
|
|
static const WindowDesc _industry_view_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 260, 120, 260, 120,
|
|
|
WC_INDUSTRY_VIEW, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
|
|
|
NULL, _nested_industry_view_widgets, lengthof(_nested_industry_view_widgets)
|
|
|
_nested_industry_view_widgets, lengthof(_nested_industry_view_widgets)
|
|
|
);
|
|
|
|
|
|
void ShowIndustryViewWindow(int industry)
|
|
|
{
|
|
|
AllocateWindowDescFront<IndustryViewWindow>(&_industry_view_desc, industry);
|
|
|
}
|
|
|
|
|
|
/** Names of the widgets of the industry directory gui */
|
|
|
enum IndustryDirectoryWidgets {
|
|
|
IDW_CLOSEBOX = 0,
|
|
|
IDW_CAPTION,
|
|
|
IDW_STICKY,
|
|
@@ -1191,19 +1191,19 @@ const StringID IndustryDirectoryWindow::
|
|
|
STR_SORT_BY_TYPE,
|
|
|
STR_SORT_BY_PRODUCTION,
|
|
|
STR_SORT_BY_TRANSPORTED,
|
|
|
INVALID_STRING_ID
|
|
|
};
|
|
|
|
|
|
|
|
|
/** Window definition of the industy directory gui */
|
|
|
static const WindowDesc _industry_directory_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 428, 190, 428, 190,
|
|
|
WC_INDUSTRY_DIRECTORY, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
|
|
|
NULL, _nested_industry_directory_widgets, lengthof(_nested_industry_directory_widgets)
|
|
|
_nested_industry_directory_widgets, lengthof(_nested_industry_directory_widgets)
|
|
|
);
|
|
|
|
|
|
void ShowIndustryDirectory()
|
|
|
{
|
|
|
AllocateWindowDescFront<IndustryDirectoryWindow>(&_industry_directory_desc, 0);
|
|
|
}
|