112 WP(w, fnd_d).timer_enabled = false; |
112 WP(w, fnd_d).timer_enabled = false; |
113 } |
113 } |
114 |
114 |
115 /* We'll perform two distinct loops, one for secondary industries, and the other one for |
115 /* We'll perform two distinct loops, one for secondary industries, and the other one for |
116 * primary ones. Each loop will fill the _fund_gui structure. */ |
116 * primary ones. Each loop will fill the _fund_gui structure. */ |
117 for (ind = IT_COAL_MINE; ind < NUM_INDUSTRYTYPES; ind++) { |
117 for (ind = 0; ind < NUM_INDUSTRYTYPES; ind++) { |
118 indsp = GetIndustrySpec(ind); |
118 indsp = GetIndustrySpec(ind); |
119 if (indsp->enabled && (!indsp->IsRawIndustry() || _game_mode == GM_EDITOR)) { |
119 if (indsp->enabled && (!indsp->IsRawIndustry() || _game_mode == GM_EDITOR)) { |
120 _fund_gui.index[_fund_gui.count] = ind; |
120 _fund_gui.index[_fund_gui.count] = ind; |
121 _fund_gui.enabled[_fund_gui.count] = CheckIfCallBackAllowsAvailability(ind, IACT_USERCREATION); |
121 _fund_gui.enabled[_fund_gui.count] = CheckIfCallBackAllowsAvailability(ind, IACT_USERCREATION); |
122 _fund_gui.count++; |
122 _fund_gui.count++; |
123 } |
123 } |
124 } |
124 } |
125 |
125 |
126 if (_patches.raw_industry_construction != 0 && _game_mode != GM_EDITOR) { |
126 if (_patches.raw_industry_construction != 0 && _game_mode != GM_EDITOR) { |
127 for (ind = IT_COAL_MINE; ind < NUM_INDUSTRYTYPES; ind++) { |
127 for (ind = 0; ind < NUM_INDUSTRYTYPES; ind++) { |
128 indsp = GetIndustrySpec(ind); |
128 indsp = GetIndustrySpec(ind); |
129 if (indsp->enabled && indsp->IsRawIndustry()) { |
129 if (indsp->enabled && indsp->IsRawIndustry()) { |
130 _fund_gui.index[_fund_gui.count] = ind; |
130 _fund_gui.index[_fund_gui.count] = ind; |
131 _fund_gui.enabled[_fund_gui.count] = CheckIfCallBackAllowsAvailability(ind, IACT_USERCREATION); |
131 _fund_gui.enabled[_fund_gui.count] = CheckIfCallBackAllowsAvailability(ind, IACT_USERCREATION); |
132 _fund_gui.count++; |
132 _fund_gui.count++; |
361 { WWT_RESIZEBOX, RESIZE_LRTB, 7, 158, 169, 200, 211, 0x0, STR_RESIZE_BUTTON}, |
361 { WWT_RESIZEBOX, RESIZE_LRTB, 7, 158, 169, 200, 211, 0x0, STR_RESIZE_BUTTON}, |
362 { WIDGETS_END}, |
362 { WIDGETS_END}, |
363 }; |
363 }; |
364 |
364 |
365 static const WindowDesc _build_industry_dynamic_desc = { |
365 static const WindowDesc _build_industry_dynamic_desc = { |
366 WDP_AUTO, WDP_AUTO, 170, 212, |
366 WDP_AUTO, WDP_AUTO, 170, 212, 170, 212, |
367 WC_BUILD_INDUSTRY, WC_NONE, |
367 WC_BUILD_INDUSTRY, WC_NONE, |
368 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE, |
368 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE, |
369 _build_dynamic_industry_widgets, |
369 _build_dynamic_industry_widgets, |
370 BuildDynamicIndustryWndProc, |
370 BuildDynamicIndustryWndProc, |
371 }; |
371 }; |
596 { WWT_PANEL, RESIZE_NONE, 9, 130, 259, 148, 159, 0x0, STR_NULL}, |
596 { WWT_PANEL, RESIZE_NONE, 9, 130, 259, 148, 159, 0x0, STR_NULL}, |
597 { WIDGETS_END}, |
597 { WIDGETS_END}, |
598 }; |
598 }; |
599 |
599 |
600 static const WindowDesc _industry_view_desc = { |
600 static const WindowDesc _industry_view_desc = { |
601 WDP_AUTO, WDP_AUTO, 260, 160, |
601 WDP_AUTO, WDP_AUTO, 260, 160, 260, 160, |
602 WC_INDUSTRY_VIEW, WC_NONE, |
602 WC_INDUSTRY_VIEW, WC_NONE, |
603 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON, |
603 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON, |
604 _industry_view_widgets, |
604 _industry_view_widgets, |
605 IndustryViewWndProc |
605 IndustryViewWndProc |
606 }; |
606 }; |
853 } |
853 } |
854 |
854 |
855 |
855 |
856 /* Industry List */ |
856 /* Industry List */ |
857 static const WindowDesc _industry_directory_desc = { |
857 static const WindowDesc _industry_directory_desc = { |
858 WDP_AUTO, WDP_AUTO, 508, 190, |
858 WDP_AUTO, WDP_AUTO, 508, 190, 508, 190, |
859 WC_INDUSTRY_DIRECTORY, WC_NONE, |
859 WC_INDUSTRY_DIRECTORY, WC_NONE, |
860 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, |
860 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, |
861 _industry_directory_widgets, |
861 _industry_directory_widgets, |
862 IndustryDirectoryWndProc |
862 IndustryDirectoryWndProc |
863 }; |
863 }; |