mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 12:06:41 +00:00
Codechange: make GrfSpecFeature a scoped enum (#15487)
This commit is contained in:
@@ -398,7 +398,7 @@ public:
|
||||
|
||||
void OnInit() override
|
||||
{
|
||||
this->badge_classes = GUIBadgeClasses{GSF_INDUSTRIES};
|
||||
this->badge_classes = GUIBadgeClasses{GrfSpecFeature::Industries};
|
||||
|
||||
/* Width of the legend blob -- slightly larger than the smallmap legend blob. */
|
||||
this->legend.height = GetCharacterHeight(FontSize::Small);
|
||||
@@ -524,11 +524,11 @@ public:
|
||||
|
||||
Rect tr = text;
|
||||
if (badge_column_widths.size() >= 1 && badge_column_widths[0] > 0) {
|
||||
DrawBadgeColumn(tr.WithWidth(badge_column_widths[0], rtl), 0, this->badge_classes, indsp->badges, GSF_INDUSTRIES, std::nullopt, PAL_NONE);
|
||||
DrawBadgeColumn(tr.WithWidth(badge_column_widths[0], rtl), 0, this->badge_classes, indsp->badges, GrfSpecFeature::Industries, std::nullopt, PAL_NONE);
|
||||
tr = tr.Indent(badge_column_widths[0], rtl);
|
||||
}
|
||||
if (badge_column_widths.size() >= 2 && badge_column_widths[1] > 0) {
|
||||
DrawBadgeColumn(tr.WithWidth(badge_column_widths[1], !rtl), 0, this->badge_classes, indsp->badges, GSF_INDUSTRIES, std::nullopt, PAL_NONE);
|
||||
DrawBadgeColumn(tr.WithWidth(badge_column_widths[1], !rtl), 0, this->badge_classes, indsp->badges, GrfSpecFeature::Industries, std::nullopt, PAL_NONE);
|
||||
tr = tr.Indent(badge_column_widths[1], !rtl);
|
||||
}
|
||||
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, STR_INDUSTRY_VIEW_PRODUCES_N_CARGO);
|
||||
ir.top = DrawStringMultiLine(ir, cargostring);
|
||||
|
||||
ir.top = DrawBadgeNameList(ir, indsp->badges, GSF_INDUSTRIES);
|
||||
ir.top = DrawBadgeNameList(ir, indsp->badges, GrfSpecFeature::Industries);
|
||||
|
||||
/* Get the additional purchase info text, if it has not already been queried. */
|
||||
if (indsp->callback_mask.Test(IndustryCallbackMask::FundMoreText)) {
|
||||
@@ -1173,12 +1173,12 @@ public:
|
||||
|
||||
bool IsNewGRFInspectable() const override
|
||||
{
|
||||
return ::IsNewGRFInspectable(GSF_INDUSTRIES, this->window_number);
|
||||
return ::IsNewGRFInspectable(GrfSpecFeature::Industries, this->window_number);
|
||||
}
|
||||
|
||||
void ShowNewGRFInspectWindow() const override
|
||||
{
|
||||
::ShowNewGRFInspectWindow(GSF_INDUSTRIES, this->window_number);
|
||||
::ShowNewGRFInspectWindow(GrfSpecFeature::Industries, this->window_number);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user