Rename members of ListItemType

This commit is contained in:
Gymnasiast committed 2026-08-07 06:57:35 +02:00
1 parent 0c4322a982
commit c166b42a67
1 file changed
+14 -14
+14 -14
View File
@@ -60,8 +60,8 @@ namespace OpenRCT2::Ui::Windows
enum class ListItemType : uint8_t
{
Heading,
Scenario,
heading,
scenario,
};
struct ScenarioListItem
@@ -446,10 +446,10 @@ namespace OpenRCT2::Ui::Windows
{
switch (listItem.type)
{
case ListItemType::Heading:
case ListItemType::heading:
y += 18;
break;
case ListItemType::Scenario:
case ListItemType::scenario:
y += scenarioItemHeight;
break;
}
@@ -470,10 +470,10 @@ namespace OpenRCT2::Ui::Windows
{
switch (listItem.type)
{
case ListItemType::Heading:
case ListItemType::heading:
mutableScreenCoords.y -= 18;
break;
case ListItemType::Scenario:
case ListItemType::scenario:
mutableScreenCoords.y -= scenarioItemHeight;
if (mutableScreenCoords.y < 0)
{
@@ -515,10 +515,10 @@ namespace OpenRCT2::Ui::Windows
{
switch (listItem.type)
{
case ListItemType::Heading:
case ListItemType::heading:
mutableScreenCoords.y -= 18;
break;
case ListItemType::Scenario:
case ListItemType::scenario:
mutableScreenCoords.y -= scenarioItemHeight;
if (mutableScreenCoords.y < 0 && !listItem.scenario.is_locked)
{
@@ -568,7 +568,7 @@ namespace OpenRCT2::Ui::Windows
switch (listItem.type)
{
case ListItemType::Heading:
case ListItemType::heading:
{
const int32_t horizontalRuleMargin = 4;
DrawCategoryHeading(
@@ -576,7 +576,7 @@ namespace OpenRCT2::Ui::Windows
y += 18;
break;
}
case ListItemType::Scenario:
case ListItemType::scenario:
{
// Draw hover highlight
const ScenarioIndexEntry* scenario = listItem.scenario.scenario;
@@ -716,14 +716,14 @@ namespace OpenRCT2::Ui::Windows
if (headingStringId != kStringIdNone)
{
ScenarioListItem headerItem;
headerItem.type = ListItemType::Heading;
headerItem.type = ListItemType::heading;
headerItem.heading.string_id = headingStringId;
_listItems.push_back(std::move(headerItem));
}
// Scenario
ScenarioListItem scenarioItem;
scenarioItem.type = ListItemType::Scenario;
scenarioItem.type = ListItemType::scenario;
scenarioItem.scenario.scenario = scenario;
if (IsLockingEnabled())
{
@@ -769,10 +769,10 @@ namespace OpenRCT2::Ui::Windows
for (auto it = _listItems.begin(); it != _listItems.end();)
{
const auto& listItem = *it;
if (listItem.type == ListItemType::Heading)
if (listItem.type == ListItemType::heading)
{
auto nextIt = std::next(it);
if (nextIt == _listItems.end() || nextIt->type == ListItemType::Heading)
if (nextIt == _listItems.end() || nextIt->type == ListItemType::heading)
{
it = _listItems.erase(it);
continue;