Close #15358: Increase park name character limit

This commit is contained in:
Michael Steenbeek 2022-07-27 17:35:15 +02:00 committed by GitHub
parent 7433119749
commit 30f477972c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View file

@ -2,6 +2,7 @@
------------------------------------------------------------------------
- Feature: [#13634] Add ability to sell merchandise in random colours.
- Feature: [#16662] Show a warning message when g2.dat is mismatched.
- Improvement: [#15358] Park and scenario names can now contain up to 128 characters.
- Improvement: [#17575] You can now search for Authors in Object Selection.
- Change: [#17319] Giant screenshots are now cropped to the horizontal view-clipping selection.
- Change: [#17499] Update error text when using vehicle incompatible with TD6 and add error when using incompatible track elements.

View file

@ -349,16 +349,19 @@ static void WindowEditorObjectiveOptionsMainMouseup(rct_window* w, rct_widgetind
case WIDX_PARK_NAME:
{
auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark();
WindowTextInputRawOpen(w, WIDX_PARK_NAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, {}, park.Name.c_str(), 32);
WindowTextInputRawOpen(
w, WIDX_PARK_NAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, {}, park.Name.c_str(), ParkNameMaxLength);
break;
}
case WIDX_SCENARIO_NAME:
WindowTextInputRawOpen(
w, WIDX_SCENARIO_NAME, STR_SCENARIO_NAME, STR_ENTER_SCENARIO_NAME, {}, gScenarioName.c_str(), 64);
w, WIDX_SCENARIO_NAME, STR_SCENARIO_NAME, STR_ENTER_SCENARIO_NAME, {}, gScenarioName.c_str(),
ScenarioNameMaxLength);
break;
case WIDX_DETAILS:
WindowTextInputRawOpen(
w, WIDX_DETAILS, STR_PARK_SCENARIO_DETAILS, STR_ENTER_SCENARIO_DESCRIPTION, {}, gScenarioDetails.c_str(), 256);
w, WIDX_DETAILS, STR_PARK_SCENARIO_DETAILS, STR_ENTER_SCENARIO_DESCRIPTION, {}, gScenarioDetails.c_str(),
ScenarioDetailsNameMaxLength);
break;
}
}

View file

@ -1007,7 +1007,8 @@ private:
{
case WIDX_ENTER_NAME:
WindowTextInputOpen(
this, WIDX_ENTER_NAME, STR_ENTER_NAME, STR_PLEASE_ENTER_YOUR_NAME_FOR_THE_SCENARIO_CHART, {}, 0, 0, 32);
this, WIDX_ENTER_NAME, STR_ENTER_NAME, STR_PLEASE_ENTER_YOUR_NAME_FOR_THE_SCENARIO_CHART, {}, 0, 0,
ParkNameMaxLength);
break;
}
}

View file

@ -16,6 +16,9 @@ constexpr auto MAX_ENTRANCE_FEE = 999.00_GBP;
constexpr const uint8_t ParkRatingHistoryUndefined = std::numeric_limits<uint8_t>::max();
constexpr const uint32_t GuestsInParkHistoryUndefined = std::numeric_limits<uint32_t>::max();
constexpr const uint8_t ParkNameMaxLength = 128;
constexpr const uint8_t ScenarioNameMaxLength = 128;
constexpr const uint16_t ScenarioDetailsNameMaxLength = 256;
enum : uint32_t
{